Hi
I'm trying to build a macro that will find a string, but the string can be 5 different things. So how do I get it to find the cell that contains this information and use the information to paste in another cell. Below is the code I have that keeps getting me an error:
Dim Space As String
Let Space = " "
Dim Fast, Food, Snack, Candy, Groceries,
Retail,Beverages As String
Dim FF As Variant
Let FF = Fast & Space & Food
Dim RB As Variant
Let RB = Retail & Space & Beverages
Dim c As Range
c = m.Find(FF Or Snack Or Candy Or Groceries Or RB)
'm is the current region defined earlier in my code
Sheets("Instructions").Select
Dim t As Range
Let t = Range("A72:B76")
Let A.Offset(0, -4) = t.Find(c).Offset(0, 1).Value
'A is an activecell range defined earlier.
If anyone could help me figure this out that would be great! Thanks! Happy Thanksgiving everyone!
I'm trying to build a macro that will find a string, but the string can be 5 different things. So how do I get it to find the cell that contains this information and use the information to paste in another cell. Below is the code I have that keeps getting me an error:
Dim Space As String
Let Space = " "
Dim Fast, Food, Snack, Candy, Groceries,
Retail,Beverages As String
Dim FF As Variant
Let FF = Fast & Space & Food
Dim RB As Variant
Let RB = Retail & Space & Beverages
Dim c As Range
c = m.Find(FF Or Snack Or Candy Or Groceries Or RB)
'm is the current region defined earlier in my code
Sheets("Instructions").Select
Dim t As Range
Let t = Range("A72:B76")
Let A.Offset(0, -4) = t.Find(c).Offset(0, 1).Value
'A is an activecell range defined earlier.
If anyone could help me figure this out that would be great! Thanks! Happy Thanksgiving everyone!