I'm trying to create a search for it will search the sheet and display information in separate area.
This is what i have but it's not pulling any info.
ub Searchdata()
Dim Lastrow As Long
Dim count As Integer
Lastrow = Sheets("Raw Data").Cells(Rows.count, 2).End(xlUp).Row
For X = 2 To Lastrow
If Sheets("Raw Data").Cells(X, 1) = Sheet1.Range("K1") Then
Sheet1.Range("M1") = Sheets("Raw Data").Cells(X, 1)
Sheet1.Range("N1") = Sheets("Raw Data").Cells(X, 2)
Sheet1.Range("O1") = Sheets("Raw Data").Cells(X, 3) & " " & Sheets("Raw Data").Cells(X, 4)
Sheet1.Range("P1") = Sheets("Raw Data").Cells(X, 5)
Sheet1.Range("Q1") = Sheets("Raw Data").Cells(X, 6)
Sheet1.Range("R1") = Sheets("Raw Data").Cells(X, 7) & " " & Sheets("Raw Data").Cells(X, 8)
End If
Next X
End Sub
This is what i have but it's not pulling any info.
ub Searchdata()
Dim Lastrow As Long
Dim count As Integer
Lastrow = Sheets("Raw Data").Cells(Rows.count, 2).End(xlUp).Row
For X = 2 To Lastrow
If Sheets("Raw Data").Cells(X, 1) = Sheet1.Range("K1") Then
Sheet1.Range("M1") = Sheets("Raw Data").Cells(X, 1)
Sheet1.Range("N1") = Sheets("Raw Data").Cells(X, 2)
Sheet1.Range("O1") = Sheets("Raw Data").Cells(X, 3) & " " & Sheets("Raw Data").Cells(X, 4)
Sheet1.Range("P1") = Sheets("Raw Data").Cells(X, 5)
Sheet1.Range("Q1") = Sheets("Raw Data").Cells(X, 6)
Sheet1.Range("R1") = Sheets("Raw Data").Cells(X, 7) & " " & Sheets("Raw Data").Cells(X, 8)
End If
Next X
End Sub