#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Weeks in period

Hi,

Is there anyway that I can take two different overlapping periods and figure
out how many weeks/days of one fall into another?
--
I need so much help, but right now, some Excel help will suffice!!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Weeks in period

Need more info. Post a sample and the expected result.

--
Biff
Microsoft Excel MVP


"Jose" wrote in message
...
Hi,

Is there anyway that I can take two different overlapping periods and
figure
out how many weeks/days of one fall into another?
--
I need so much help, but right now, some Excel help will suffice!!



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default Weeks in period

On Jan 24, 12:38*pm, Jose wrote:
Is there anyway that I can take two different overlapping periods
and figure out how many weeks/days of one fall into another?


Suppose the start and end date of one period are in A1 and A2
respectively, and the start and end date of the other period are in B1
and B2.

The number of days of in the overlap, if any, is:

=max(0, min(A2,B2) - max(A1,B1) + 1)

The number of "weeks" is harder. First, you need to define the term.

If you simply mean the number of 7-day intervals, take the computed
days (above) and divide by 7, rounding or rounding up or rounding down
as you desire.

If you mean the number of calendar weeks, that's a whole other
ballgame. The following might work for you:

=(max(A1,B1)<=min(A2,B2)) * max(0, weeknum(min(A2,B2)) -
weeknum(max(A1,B1)) + 52*(year(min(A2,B2)) - year(max(A1,B1))) + 1)

That assumes that you want to count any partial week as entire week.
Obviously, it would be more efficient to compute the overlapping start
and end dates -- max(A1,B1) and min(A2,B2) respectively -- in cells.

Caveat: I have not tested the above formulas with all combinations
overlaps (or not) and spreads across multiple years. You should test
them carefully to be sure that they truly work -- unless someone
provides something better, of course.

HTH.
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
pay back period Kake Excel Worksheet Functions 2 May 20th 07 05:04 PM
Payback Period rk0909 Excel Discussion (Misc queries) 1 April 12th 07 04:27 PM
Period to Period percentage change? cs120 Excel Discussion (Misc queries) 1 September 18th 05 12:05 PM
Input period, but get .+ Cameronsmi Excel Discussion (Misc queries) 2 June 24th 05 05:58 PM
calculate weeks from a start date ( not yr weeks) Todd F. Excel Worksheet Functions 6 November 27th 04 05:53 PM


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