0
我有許多國家的文件,我必須獲取單詞(哪一個在列A中),然後複製該單詞的%(列中的15%我)並將其粘貼在其他一些表格中。查找單詞並複製另一個表格中的值
我想從第一張表找到windows 8和windows平板電腦並粘貼到第二張表中。
我從Shiddarth潰敗的博客中找到一個宏來幫助找到這個詞。我已經複製下面。但是我需要在找到這個詞後複製並粘貼另一個excel表格中的百分比。你能幫我解決這個問題嗎?
對於防爆:
Sub Sample1()
Dim oSht As Worksheet
Dim lastRow As Long, i As Long
Dim strSearch As String
Dim aCell As Range
t = GetTickCount
On Error GoTo Err
Set oSht = Sheets("Sheet1")
lastRow = oSht.Range("A" & Rows.Count).End(xlUp).Row
strSearch = "Windows 8"
Set aCell = oSht.Range("A1:A" & lastRow).Find(What:=strSearch, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
If Not aCell Is Nothing Then
MsgBox "Value Found in Cell " & aCell.Address & vbCrLf & _
"and it took " & GetTickCount - t & "milliseconds"
End If
Exit Sub
Err:
MsgBox Err.Description
End Sub
這正是我一直在尋找的東西。非常感謝您的幫助。 – Tanuvi