Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Character & Highlight Cell
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
find the last occurance of a character in a cell | Excel Discussion (Misc queries) | |||
Find first character in cell | Excel Worksheet Functions | |||
find replace the 1st character in a cell | Excel Discussion (Misc queries) | |||
find a cell with a character | Excel Worksheet Functions | |||
click on one cell to find and highlight a related cell? | Excel Discussion (Misc queries) |