VBABEGINER
Well-known Member
- Joined
- Jun 15, 2011
- Messages
- 1,284
- Office Version
- 365
- Platform
- Windows
Dear All,
I need help to highlight cells which contain specific text and make them color.
Example-
I want to make color only those cells which will contains " in " & " or ".
Not "in anytext" OR "anytext in" OR "or anytext" OR "anytext or".
small letter only.
Can we make any code for this please..
I have write this code..but this is not worked..
I need help to highlight cells which contain specific text and make them color.
Example-
Col A
abc or p
pqr in op
in abc
pqr or
I want to make color only those cells which will contains " in " & " or ".
Not "in anytext" OR "anytext in" OR "or anytext" OR "anytext or".
small letter only.
Can we make any code for this please..
I have write this code..but this is not worked..
Range("A2").Select
i = 2 'start row number
For Each c In ActiveSheet.Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row)
Rng = "A" & i
If Range("A" & i).Value = " in " Then
Range(Rng).Interior.ColorIndex = 1
Else
End If
i = i + 1
Next c