Hi,
I am trying to find a code / macro that will do the following that someone of you Guru's can help me out.
· Search from rawdata sheet and fill the results in search sheet
below the code that i used but didn't work with me
Your help is always gratefully appreciated
With respect,
I am trying to find a code / macro that will do the following that someone of you Guru's can help me out.
· Search from rawdata sheet and fill the results in search sheet
below the code that i used but didn't work with me
Code:
Sub searchdata()
Dim lastrow As Long
Dim count As Integer
lastrow = Sheets("rawData").Range("A" & Rows.count).End(xlUp).Row
count = 0
For x = 2 To lastrow
If Sheets(“rawData”).Cells(x, "B") = Search.Range(“C2”) Then
Search.Range(“C4”) = Sheets(“rawData”).Cells(x, 1)
Search.Range(“C6”) = Sheets(“rawData”).Cells(x, 2)
Search.Range(“C8”) = Sheets(“rawData”).Cells(x, 3)
count = count + 1
End If
Next x
If count = 0 Then
MsgBox "No data"
End If
End Sub
Your help is always gratefully appreciated
With respect,