Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
jackalx
 
Posts: n/a
Default Conditional formatting applicable to entire column


Hello everyone,

I have one column which contains only dates. What I am trying to do is
to add in conditional formatting which will compare the value in each
cell with today and two weeks later. If the date in the cell is within
2 weeks, color it yellow. If the date is today, color it red. I have
read some posts in the forum and followed them, but I encounter 3
problems:

(1) I can't seem to apply the conditions to an entire column. I have to
manually select the range of cells. Why I want to select the entire
column is so that when I add new values in later cells, the conditional
formatting straightaway applies to them.

(2) Blank cells are treated as true. When I select a range of cells and
input the formula, I notice that blank cells are treated as having
satisfied the condition and are highlighted yellow.

(3) Comparing the dates (the formula i use is "xxx-now()<14", where xxx
is the cell value) works in both directions (that is, it checks if the
date is within 2 weeks before or after). I am interested only in
comparing future dates, not past.

Any help is most appreciated.

Jason


--
jackalx
------------------------------------------------------------------------
jackalx's Profile: http://www.excelforum.com/member.php...o&userid=23766
View this thread: http://www.excelforum.com/showthread...hreadid=374145

  #2   Report Post  
tkaplan
 
Posts: n/a
Default


select the entire column that you have the dates in - assume col C

in conditional formatting:

format backround to red and in condition select forumla is and type
in:
=AND(C1<"",DATE(YEAR(C1),MONTH(C1),DAY(C1))=DATE( YEAR(NOW()),MONTH(NOW()),DAY(NOW())))

create another conditional format with background yellow, select
forumla is and type in:
=AND(C1<"",DATE(YEAR(C1),MONTH(C1),DAY(C1))DATE( YEAR(NOW()),MONTH(NOW()),DAY(NOW()))-14,DATE(YEAR(C1),MONTH(C1),DAY(C1))<DATE(YEAR(NOW( )),MONTH(NOW()),DAY(NOW()))+14)

hth


--
tkaplan
------------------------------------------------------------------------
tkaplan's Profile: http://www.excelforum.com/member.php...o&userid=22987
View this thread: http://www.excelforum.com/showthread...hreadid=374145

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 Error ddate Excel Worksheet Functions 0 May 5th 05 09:00 PM
Trying to add conditional formatting to every other cell...GOING . trixiebme Excel Worksheet Functions 2 March 24th 05 01:55 PM
Conditional formatting row if cell value in certain column is even Hyland Hunt Excel Worksheet Functions 1 February 2nd 05 08:21 PM
Effect of Conditional Formatting, Data Validation Bill Sturdevant Excel Discussion (Misc queries) 1 January 25th 05 11:50 PM
copying conditional formatting to an entire column MaryMalone Excel Discussion (Misc queries) 1 November 30th 04 04:04 AM


All times are GMT +1. The time now is 04:49 AM.

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"