#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 470
Default Date Calculation

I have a worksheet with columns that represent the dates that I get paid. I
get paid on the 15th and 30th of each month, unless, it is Feb, then the last
day of the month (28th or 29th).

I want to be able to have the date calculated automatically. I can figure
the calculation for the 30th (previous date + 15), but I don't know if there
is an easy way to calculate the 15th since the number of days in a month vary.

Any help greatly appreciated!!

Les
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Date Calculation

Try this:

Enter the first date in cell A1, either the 15th or last date for a
particular month: 1/15/2008 or 1/31/2008

Enter this formula in B1 and copy across as needed:

=IF(DAY(A1)15,A1+15,A1+17-DAY(A1+17))

Format as DATE

--
Biff
Microsoft Excel MVP


"WLMPilot" wrote in message
...
I have a worksheet with columns that represent the dates that I get paid.
I
get paid on the 15th and 30th of each month, unless, it is Feb, then the
last
day of the month (28th or 29th).

I want to be able to have the date calculated automatically. I can figure
the calculation for the 30th (previous date + 15), but I don't know if
there
is an easy way to calculate the 15th since the number of days in a month
vary.

Any help greatly appreciated!!

Les



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default Date Calculation

Hi Les,

With 15 Jan 2000 (or any other pay date) in A1, this formula in A2:

=IF(DAY(A1)=15,MIN(DATE(YEAR(A1),MONTH(A1),30),DAT E(YEAR(A1),MONTH(A1)+1,0)),DATE(YEAR(A1),MONTH(A1) +1,15))

and copy down as far as you need.


--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"WLMPilot" wrote in message ...
|I have a worksheet with columns that represent the dates that I get paid. I
| get paid on the 15th and 30th of each month, unless, it is Feb, then the last
| day of the month (28th or 29th).
|
| I want to be able to have the date calculated automatically. I can figure
| the calculation for the 30th (previous date + 15), but I don't know if there
| is an easy way to calculate the 15th since the number of days in a month vary.
|
| Any help greatly appreciated!!
|
| Les


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Date Calculation

Ooops!

Disregard. I see you wanted the 15th and 30th, not the eomonth!

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Try this:

Enter the first date in cell A1, either the 15th or last date for a
particular month: 1/15/2008 or 1/31/2008

Enter this formula in B1 and copy across as needed:

=IF(DAY(A1)15,A1+15,A1+17-DAY(A1+17))

Format as DATE

--
Biff
Microsoft Excel MVP


"WLMPilot" wrote in message
...
I have a worksheet with columns that represent the dates that I get paid.
I
get paid on the 15th and 30th of each month, unless, it is Feb, then the
last
day of the month (28th or 29th).

I want to be able to have the date calculated automatically. I can
figure
the calculation for the 30th (previous date + 15), but I don't know if
there
is an easy way to calculate the 15th since the number of days in a month
vary.

Any help greatly appreciated!!

Les





  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 470
Default Date Calculation

WOW, that worked great!!! Don't understand what the formula is doing, but
will try to break it down.

Thanks,
Les

"Niek Otten" wrote:

Hi Les,

With 15 Jan 2000 (or any other pay date) in A1, this formula in A2:

=IF(DAY(A1)=15,MIN(DATE(YEAR(A1),MONTH(A1),30),DAT E(YEAR(A1),MONTH(A1)+1,0)),DATE(YEAR(A1),MONTH(A1) +1,15))

and copy down as far as you need.


--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"WLMPilot" wrote in message ...
|I have a worksheet with columns that represent the dates that I get paid. I
| get paid on the 15th and 30th of each month, unless, it is Feb, then the last
| day of the month (28th or 29th).
|
| I want to be able to have the date calculated automatically. I can figure
| the calculation for the 30th (previous date + 15), but I don't know if there
| is an easy way to calculate the 15th since the number of days in a month vary.
|
| Any help greatly appreciated!!
|
| Les



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
Date Calculation AndyO_UK Excel Worksheet Functions 2 December 6th 06 11:07 AM
Tricky Date calculation: How to calculate a future date [email protected] Excel Discussion (Misc queries) 9 August 11th 06 04:24 AM
Date calculation MIchel Khennafi Excel Worksheet Functions 3 April 27th 06 07:35 PM
Need help with a date calculation jr100 Excel Discussion (Misc queries) 2 February 8th 06 06:47 PM
Date Calculation Grant Excel Worksheet Functions 4 August 31st 05 08:13 PM


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