Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Nic Nic is offline
external usenet poster
 
Posts: 25
Default Conditional Formatting

I have a spreadsheet with documents that are overdue. I want column D, which
contains the contract number for that doucment, to be highlighted when the
due date in column Q has past.

However, there are three different colours I want column D to be
highlighted, red if over 2 weeks overdue, orange if 1-2 weeks overdue and
yellow if 0-1 week overdue.

I would appreciate any help on this one!!

Cheers
Nic
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Conditional Formatting

Sub dt()
lr = Cells(Rows.Count, 17).End(xlUp).Row
For i = 1 To lr
x = Date
y = Range("Q" & i).Value
If x - y <= 7 Then
Range("D" & i).Interior.ColorIndex = 6
ElseIf x - y = 8 And x - y <= 14 Then
Range("D" & i).Interior.ColorIndex = 12
ElseIf x - y = 15 Then
Range("D" & i).Interior.ColorIndex = 3
End If
Next
End Sub

"Nic" wrote:

I have a spreadsheet with documents that are overdue. I want column D, which
contains the contract number for that doucment, to be highlighted when the
due date in column Q has past.

However, there are three different colours I want column D to be
highlighted, red if over 2 weeks overdue, orange if 1-2 weeks overdue and
yellow if 0-1 week overdue.

I would appreciate any help on this one!!

Cheers
Nic

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Conditional Formatting

If your date is in Q1, then ConditionalFormat D1 as follows:

"formula is" for condition 1:
=Q1<NOW()-14

"formula is" for condition 2:
=AND(Q1=NOW()-14,Q1<NOW()-7)

"formula is" for condition 3:
=AND(Q1=NOW()-7,Q1<NOW())

For each condition set the color as needed.

Cheers,

Joerg Mochikun


"Nic" wrote in message
...
I have a spreadsheet with documents that are overdue. I want column D,
which
contains the contract number for that doucment, to be highlighted when the
due date in column Q has past.

However, there are three different colours I want column D to be
highlighted, red if over 2 weeks overdue, orange if 1-2 weeks overdue and
yellow if 0-1 week overdue.

I would appreciate any help on this one!!

Cheers
Nic



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
Formatting Conditional Formatting Icon Sets The Rook[_2_] Excel Discussion (Misc queries) 3 March 7th 09 08:48 PM
Formatting cells in a column with conditional formatting? shamor Excel Discussion (Misc queries) 8 May 19th 08 10:11 PM
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
conditional Formatting based on cell formatting Totom Excel Worksheet Functions 0 January 15th 07 04:35 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


All times are GMT +1. The time now is 06:41 AM.

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"