Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
conditional formatting:highlight row based on blank or non-blank c Nat Maxwell Excel Worksheet Functions 3 May 14th 23 07:43 PM
Format a blank cell based on the value of another cell tracktor Excel Worksheet Functions 2 May 17th 08 07:59 AM
Conditional Format Based on Age, but not if blank. Gregory Day Excel Worksheet Functions 7 March 28th 08 10:55 PM
conditional formatting:highlight row based on blank or non-blank c Nat Maxwell Excel Discussion (Misc queries) 2 November 30th 05 10:30 PM
How do I make a blank cell with a date format blank? Pivot Table/Query Excel Worksheet Functions 6 June 14th 05 11:19 PM


All times are GMT +1. The time now is 07:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"