Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Coloring a range depending on a cell value
Mine colors the row of the cell with a value more then 0: Its not the best as I have used If not ... but it works Sub ChangeRowColor() Dim Cell As Range For Each Cell In Range("Q1:Q20") If IsEmpty(Cell) Then GoTo EmptyCell If Not Cell <= 0 Then Cell.EntireRow.Select With Selection.Interior .ColorIndex = 3 .Pattern = xlSolid End With End If Next Cell EmptyCell: MsgBox "All Suppliers with a positiv 'Grand Total' is now colored red" End Su -- Ctec ----------------------------------------------------------------------- Ctech's Profile: http://www.excelforum.com/member.php...fo&userid=2774 View this thread: http://www.excelforum.com/showthread.php?threadid=47330 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
updating cell range depending on input value | Excel Worksheet Functions | |||
Cell coloring when the value is an integer and within said range | Excel Worksheet Functions | |||
Selecting range in list of range names depending on a cell informa | Excel Discussion (Misc queries) | |||
Conditional formatting depending a range of cell | Excel Worksheet Functions | |||
print a certain range depending what is in cell? | Excel Programming |