Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
HeatherDawn
 
Posts: n/a
Default How do I break a date range by month?

I am trying to calculated the days in a month for a 14 day pay period. What
I want to do is to calculate how many days are in each month if the pay
period crosses a month. For example the begining date is 8/21/05 and it ends
9/3/05. I was wondering if there is a formula that will allow me to
calculated that there are 3 days in Sept and 11 in August. Thanks
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=DATE(YEAR(start),MONTH(start)+1,0)-start+1

and

=end-DATE(YEAR(end),MONTH(end),0)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"HeatherDawn" wrote in message
...
I am trying to calculated the days in a month for a 14 day pay period.

What
I want to do is to calculate how many days are in each month if the pay
period crosses a month. For example the begining date is 8/21/05 and it

ends
9/3/05. I was wondering if there is a formula that will allow me to
calculated that there are 3 days in Sept and 11 in August. Thanks



  #3   Report Post  
Dave O
 
Posts: n/a
Default

I mocked up some sample data: pay period start date in column A, end
date in column B. When A2 and B2 are populated, the formula in C2 is
=IF(MONTH(A3)<MONTH(B3),"Days in " & TEXT(A3,"mmmm") &": " &
EOMONTH(A3,0)-A3+1 & "; Days in " & TEXT(B3,"mmmm") &":
"&B3-EOMONTH(B3,-1),"Days in " & TEXT(A3,"mmmm") &": " & B3-A3+1)

This will determine the number of days in a single month or in both
months when the pay period spans 2 months.

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
Match function...random search? Les Excel Worksheet Functions 10 July 28th 05 11:54 AM
If formula for date range rediproof Excel Discussion (Misc queries) 9 May 28th 05 04:59 AM
adding occurrences for date range Mike Excel Discussion (Misc queries) 1 April 28th 05 09:14 PM
Completion Percentage of a date range Brian Excel Discussion (Misc queries) 4 March 4th 05 05:49 PM
Return the end of month date from a date Steve F. Excel Worksheet Functions 3 October 28th 04 06:17 PM


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