Snap Happy
New Member
- Joined
- Dec 8, 2009
- Messages
- 18
Please help.I'm trying to find a value in a column when the value is a variable.For example the code Selection.Find(What:="9000106228", After:=ActiveCell, LookIn:=xlFormulas _ , LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).ActivateFinds the value 9000106228 but I need to put a variable in the formula instead of the required value. I have tried Selection.Find(What:= x, After:=ActiveCell, LookIn:=xlFormulas _ , LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activatewere x is the varying value each time the macro is run but this syntax is not accepted. Does anyone know how I should do this?Many Thanks