LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default VBA format on conditions

I have the need to identify and mark large worksheets that we display during
twice weekly meetings. To make the data a little easier to read, we color
rows based on certian values. The code below does that great, but I need to
add another part that would also look at the cell which contains the date,
and mark it red if it today or past due. Can I do this?

Dim eRow As Long
Dim i As Long
eRow = Cells(Rows.Count, 12).End(xlUp).Row
For i = eRow To 2 Step -1
If Cells(i, 12).Value = "DOCK" Or Cells(i, 12).Value = "FROZ" Or _
Cells(i, 12).Value = "Loan Repay" Or Cells(i, 12).Value = "TRAN" Then
Rows(i).EntireRow.Select
With Selection.Interior
.ColorIndex = 4
.Pattern = xlSolid
End With
End If

Thanks
 
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 format with 3 conditions marc freshley Excel Worksheet Functions 2 August 15th 07 01:38 PM
Cond Format - 7 conditions Sarah Excel Discussion (Misc queries) 6 April 28th 07 08:20 AM
Conditional Format - 3 conditions Mike Saffer Excel Worksheet Functions 3 April 13th 06 07:35 PM
Two conditions for same format?? christopherp Excel Discussion (Misc queries) 4 March 24th 06 01:19 AM
Format Conditions Todd Huttenstine[_2_] Excel Programming 3 December 13th 03 03:02 PM


All times are GMT +1. The time now is 03:56 PM.

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

About Us

"It's about Microsoft Excel"