Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default conditional formatting of dates

I have a date in cell d6 and a number representing a day in cell d4.
For example, the date is 03/15/2009 in d6 and the number in d4 is 20.
I need a formula to return the next occurence of the 20th from the date in
d6. In the example above the next occurence would be 3/20/2009. If the date
were 12/22/2009, the formula should return 1/20/2010. If the date is on the
number in d4 (20th), for example 05/20/2009, the formula should return
5/20/2009. Any help is greatly appreciated!

Thanks in advance.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default conditional formatting of dates

=IF(D4=DAY(D6),DATE(YEAR(D6),MONTH(D6),D4),DATE(Y EAR(D6),MONTH(D6)+1,D4))
--
David Biddulph

"Gretchster" wrote in message
...
I have a date in cell d6 and a number representing a day in cell d4.
For example, the date is 03/15/2009 in d6 and the number in d4 is 20.
I need a formula to return the next occurence of the 20th from the date in
d6. In the example above the next occurence would be 3/20/2009. If the
date
were 12/22/2009, the formula should return 1/20/2010. If the date is on
the
number in d4 (20th), for example 05/20/2009, the formula should return
5/20/2009. Any help is greatly appreciated!

Thanks in advance.




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default conditional formatting of dates

Thank you very much! It worked perfectly!

"David Biddulph" wrote:

=IF(D4=DAY(D6),DATE(YEAR(D6),MONTH(D6),D4),DATE(Y EAR(D6),MONTH(D6)+1,D4))
--
David Biddulph

"Gretchster" wrote in message
...
I have a date in cell d6 and a number representing a day in cell d4.
For example, the date is 03/15/2009 in d6 and the number in d4 is 20.
I need a formula to return the next occurence of the 20th from the date in
d6. In the example above the next occurence would be 3/20/2009. If the
date
were 12/22/2009, the formula should return 1/20/2010. If the date is on
the
number in d4 (20th), for example 05/20/2009, the formula should return
5/20/2009. Any help is greatly appreciated!

Thanks in advance.





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default conditional formatting of dates

Hi,

Try this

=EOMONTH(D6,IF(DAY(D6)<20,-1,0))+D4

The EOMONTH function is part of the ATP in 2003 and earlier so you would
need to attach it by choosing Tools, Add-ins, and checking the Analysis
ToolPak.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Gretchster" wrote:

I have a date in cell d6 and a number representing a day in cell d4.
For example, the date is 03/15/2009 in d6 and the number in d4 is 20.
I need a formula to return the next occurence of the 20th from the date in
d6. In the example above the next occurence would be 3/20/2009. If the date
were 12/22/2009, the formula should return 1/20/2010. If the date is on the
number in d4 (20th), for example 05/20/2009, the formula should return
5/20/2009. Any help is greatly appreciated!

Thanks in advance.


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 dates? ReapeR Excel Worksheet Functions 8 June 30th 09 02:19 PM
conditional formatting - dates Roger[_3_] New Users to Excel 3 January 18th 09 05:30 AM
Conditional Formatting with Dates talltom Excel Worksheet Functions 2 March 5th 08 08:02 PM
Conditional Formatting with Dates JoAnn New Users to Excel 2 February 25th 08 03:12 PM
Conditional formatting dates Joe Excel Discussion (Misc queries) 2 January 17th 07 02:28 PM


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