Hi,
I have searched for days to find this code as I am not knowledgeable enough to write it myself. I want to expand this VBA code from a single use code to a multiple use code. eg looping through the range to the final row.
This code works exactly what I want it to do, but only for one row, I would like it to loop though to the final row.
This being Sheets ("Record") Range("C2:C500").
Range ("C8") on sheets ("Menu") is the first cell of the key words list to search for. I require this line of code to search for multiple key words in this range. eg loop through the keywords.
Range ("E8") on sheets ("Menu") is also a list (range) of words (text values). This list is the words that will be placed in the next cell over when a keyword match is found.
Can you help it would be appreciated.
Sub Start_Search_Button()
Dim x As Variant
Dim y As Variant
x = Sheets("Menu").Range("C8").Value
y = Sheets("Menu").Range("E8")
Sheets("Record").Activate
Range("C2:C500").Find(What:=x, LookIn:=xlValues).Activate
ActiveCell.Offset(0, 1).Activate
ActiveCell = y
End Sub
I have searched for days to find this code as I am not knowledgeable enough to write it myself. I want to expand this VBA code from a single use code to a multiple use code. eg looping through the range to the final row.
This code works exactly what I want it to do, but only for one row, I would like it to loop though to the final row.
This being Sheets ("Record") Range("C2:C500").
Range ("C8") on sheets ("Menu") is the first cell of the key words list to search for. I require this line of code to search for multiple key words in this range. eg loop through the keywords.
Range ("E8") on sheets ("Menu") is also a list (range) of words (text values). This list is the words that will be placed in the next cell over when a keyword match is found.
Can you help it would be appreciated.
Sub Start_Search_Button()
Dim x As Variant
Dim y As Variant
x = Sheets("Menu").Range("C8").Value
y = Sheets("Menu").Range("E8")
Sheets("Record").Activate
Range("C2:C500").Find(What:=x, LookIn:=xlValues).Activate
ActiveCell.Offset(0, 1).Activate
ActiveCell = y
End Sub