Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ryan,
I suggest you check for a number also because if there's text in the range that too will evaluate as 0. -- Mike When competing hypotheses are equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. Occam''s razor (Abbrev) "Ryan H" wrote: I would prefer to use conditional formatting instead of code. Look up Conditional Formatting in the help section it should help you. If you must use code you can use this: Sub HighlightCells() Dim rng As Range For Each rng In Range("A1:A" & Cells(Rows.Count, "A").End(xlUp).Row) If rng.Value 0 Then rng.Interior.Color = vbYellow End If Next rng End Sub Hope this helps! If so, let me know, click "YES" below. -- Cheers, Ryan "Jodie" wrote: I need to write a macro where all cells within a specified column are highlighted in yellow if they have a value greater than zero. Can anyone please help with this? -- Thank you, Jodie |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
want to highlight cell which having comment & greater than 0 | Excel Discussion (Misc queries) | |||
Highlight MAX Cell Greater Than Zero | Excel Discussion (Misc queries) | |||
how to highlight more related cells if cell highlight | Excel Discussion (Misc queries) | |||
Greater of Two Cells | Excel Worksheet Functions | |||
Highlight cells with ctrl-click but only un-highlight one cell | Excel Discussion (Misc queries) |