dispelthemyth
Well-known Member
- Joined
- Mar 16, 2006
- Messages
- 664
- Office Version
- 365
- Platform
- Windows
I am trying to detect if the "IF" function has been used so i have the following by using thhe find in Excel
Range("C16:C20").Select
Selection.Find(What:="=if(", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Does anyone know how to use this to get a result
That is if any of the cells in the range contain "=if(" then the offset(0, 1).value = 1 otherwise it becomes 2
Regards
Graeme
Range("C16:C20").Select
Selection.Find(What:="=if(", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Does anyone know how to use this to get a result
That is if any of the cells in the range contain "=if(" then the offset(0, 1).value = 1 otherwise it becomes 2
Regards
Graeme