View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Find Character & Highlight Cell

If c.Text = Sheets("Sheet1").Range("F2").Text

If you are using the Find command either manually or in code, use ~*
instead of just *

--
Regards,
Tom Ogilvy

"J-Money" wrote in message
ups.com...
I'm trying to hightlight cells that have the asterisk (*) symbol in
them. I have tried a couple things, but it is not coming to fruition.
Can somebody please look at my code below and let me know what I am
missing or suggest a better method at getting to the end result?

------------------------------------------
Dim c As Range
Dim rng As Range

For Each c In Sheets("Sheet1").Range(Cells(1, "A"),
Cells(Rows.Count, "K").End(xlUp))
If c = Sheets("Sheet1").Range("F2") Then
Set rng = Sheets("Sheet1").Range(Cells(c.Row, "A"),
Cells(c.Row, "K"))
With rng.Interior
.ColorIndex = 16
.Pattern = xlSolid
End With
End If
Next c
-------------------------------------------

Thank you,

J