• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Search from sheet and fill the results in search sheet

Status
Not open for further replies.

Ziara

New Member
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 :(

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,
 
Hi:

Why can't you use any look up function to achieve this? If you want vba code upload your sample file here. The code you have given above is not in the right syntax and have to be rewritten entirely.

Thanks
 
Thanks

forum.chandoo.org/threads/search-find-and-copy-need-help.34455/

Check my post here, the fole is there

Appreciate your support man, I'm new with macro


▬▬▬▬▬▬▬▬▬ Mod edit : thread closed as duplicate !
 
Status
Not open for further replies.
Back
Top