Find a vlaue, shade another cell
Hi,
Try this
Sub Sonic()
lastRow = Cells(Cells.Rows.Count, "C").End(xlUp).Row
Set MyRange = Range("C1:C" & lastRow)
For Each c In MyRange
If Left(c.Value, 2) = "46" Then
c.Offset(, 10).Font.ColorIndex = 5
End If
Next
End Sub
Mike
"Withnails" wrote:
I would like to search column c in an excel sheet for any number that starts
with '46'. all the numbers in the column will be 7 digits long (eg. 4634567)
once found I would like to turn the font blue in the cell 10 columns to the
right of this 46 cell.
the macro should loop down column c until it can find no further values.
any ideas if this is possible?
|