Hi all new to this site very helpful it has been, im using 2007 created a data sheet so i can enter data into column a,b,c,d and have made a searh engine to search for results, the problem im having is it only searches the column A SO IT GIVES ME THE LAST ENTRY OF WHAT I AM SEARCHING FOR, I NEED IT TO SEARCH COLUMN B as well to give me the result of C & D here is the code on the search button i need another string of commands to make it search B can anyone help thanks Martin
Private Sub CommandButton1_Click()
row_number = 0
Do
DoEvents
row_number = row_number + 1
item_in_review = Sheets("PartsData").Range("A" & row_number)
If item_in_review = TextBox1.Text Then
TextBox2.Text = Sheets("PartsData").Range("B" & row_number)
TextBox3.Text = Sheets("PartsData").Range("c" & row_number)
TextBox4.Text = Sheets("PartsData").Range("D" & row_number)
End If
Loop Until item_in_review = ""
End Sub
Bookmarks