Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
format row based on non-blank or blank cell
Hello,
I use excel for construction estimates. It would be a nice if a line item would be black if either the quantity was filled in, or the notes field was filled out explaining why it was not. I'd like the other line items to be grey, but not deleted. what might a program look like that made a row grey if either column e or n were blank? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
format row based on non-blank or blank cell
Put this code in the worksheet you wish to act on, when the worksheet
changes the current row is tested Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 5 Or Target.Column = 14 Then If Val(Cells(Target.Row, 5)) = 0 And Trim(Cells(Target.Row, 14)) = "" Then Rows(Target.Row).Font.ColorIndex = 15 Else Rows(Target.Row).Font.ColorIndex = 0 End If End If End Sub -- Cheers Nigel "mhoffmeier" wrote in message oups.com... Hello, I use excel for construction estimates. It would be a nice if a line item would be black if either the quantity was filled in, or the notes field was filled out explaining why it was not. I'd like the other line items to be grey, but not deleted. what might a program look like that made a row grey if either column e or n were blank? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
conditional formatting:highlight row based on blank or non-blank c | Excel Worksheet Functions | |||
Format a blank cell based on the value of another cell | Excel Worksheet Functions | |||
Conditional Format Based on Age, but not if blank. | Excel Worksheet Functions | |||
conditional formatting:highlight row based on blank or non-blank c | Excel Discussion (Misc queries) | |||
How do I make a blank cell with a date format blank? | Excel Worksheet Functions |