View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
gti_jobert[_20_] gti_jobert[_20_] is offline
external usenet poster
 
Posts: 1
Default Cycle through each row and look for string in each cell


Hi pal,

This is the code to search through all your values in your cells;

Code:
--------------------

i = 1:
Do
If InStr(1, Cells(i, 1).Value, "Total", vbTextCompare) < 0 Then
'change cell colour code here
End If
i = i + 1
Loop Until Cells(i, 1).Value = ""

--------------------


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=513103