Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 159
Default Conditionally Format Particular Dates

Can't seem to work this one out.

Col A has dates in it. If today is either a Friday, Saturday or
Sunday, and the date in A is more than 1 yr before the coming Sunday's
date (or today's date if today is Sunday) conditionally format (turn
red, underline, whatever) A. If today is any other day and the date
in A is more than 1 yr before today, conditionally format (turn
red...etc) A.

I hope I've explained that clearly.

(Need it to work for leap years as well as ordinary years.)

Regards
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,549
Default Conditionally Format Particular Dates

Give this a try...
=OR(AND(WEEKDAY(TODAY(),2)<5,YEARFRAC(TODAY(),A1,1 )1),AND(WEEKDAY(TODAY(),2)4,YEARFRAC(TODAY()+7-WEEKDAY(TODAY(),2),A1,1)1))
'---
Depending on xl version, requires loading analysis tool pak

--
Jim Cone
Portland, Oregon USA .
http://www.contextures.com/excel-sort-addin.html .
editorial review of special sort excel add-in (30 ways to sort)






"robzrob"
wrote in message
...
Can't seem to work this one out.

Col A has dates in it. If today is either a Friday, Saturday or
Sunday, and the date in A is more than 1 yr before the coming Sunday's
date (or today's date if today is Sunday) conditionally format (turn
red, underline, whatever) A. If today is any other day and the date
in A is more than 1 yr before today, conditionally format (turn
red...etc) A.

I hope I've explained that clearly.

(Need it to work for leap years as well as ordinary years.)

Regards



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
Format Row Conditionally FrankM Excel Programming 4 March 3rd 09 06:10 PM
conditionally format anumber format Montana Excel Worksheet Functions 5 January 15th 08 05:25 PM
Conditionally format row height CDAK Excel Programming 3 June 8th 05 09:31 PM
conditionally format cells elad Excel Worksheet Functions 2 May 13th 05 03:57 PM
Conditionally format Terri Excel Programming 1 November 15th 04 08:06 PM


All times are GMT +1. The time now is 01:57 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"