Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Calculating a week between a range of dates

Hi,

I have a little table which looks up a period number, and also has 4
columns for the week numbers of the period.

Example

Period week 1 week 2 week 3 week4
P1 05/04/10 12/04/10 19/04/10 26/04/10
P2 03/05/10 10/05/10 17/05/10 24/05/10

I have worked out a simple formala, to say if todays date is 13/04/10,
it will return period P1. (as its between 05/04/10 - 03/05/10)

What i am trying to do, is to now work out the week number , which
should be week 2 (as its between 12/04/10 - 19/04/10)

Any help fully appriciated.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 834
Default Calculating a week between a range of dates

How about this

=INDEX(B1:E1,MATCH(TODAY()-WEEKDAY(TODAY())+2,INDEX(B1:E3,MATCH(TODAY()-WEEKDAY(TODAY())+2,B:B,1),0),0))

--

HTH

Bob

"Terry Tibbs" wrote in message
...
Hi,

I have a little table which looks up a period number, and also has 4
columns for the week numbers of the period.

Example

Period week 1 week 2 week 3 week4
P1 05/04/10 12/04/10 19/04/10 26/04/10
P2 03/05/10 10/05/10 17/05/10 24/05/10

I have worked out a simple formala, to say if todays date is 13/04/10,
it will return period P1. (as its between 05/04/10 - 03/05/10)

What i am trying to do, is to now work out the week number , which
should be week 2 (as its between 12/04/10 - 19/04/10)

Any help fully appriciated.

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Calculating a week between a range of dates

Thank you,
This seems to have worked.



On 13 Apr, 11:18, "Bob Phillips" wrote:
How about this

=INDEX(B1:E1,MATCH(TODAY()-WEEKDAY(TODAY())+2,INDEX(B1:E3,MATCH(TODAY()-WEE*KDAY(TODAY())+2,B:B,1),0),0))

--

HTH

Bob

"Terry Tibbs" wrote in message

...



Hi,


I have a little table which looks up a period number, and also has 4
columns for the week numbers of the period.


Example


Period *week 1 * * *week 2 * * week 3 * *week4
P1 * * * * 05/04/10 * *12/04/10 * 19/04/10 *26/04/10
P2 * * * * 03/05/10 * *10/05/10 * 17/05/10 *24/05/10


I have worked out a simple formala, to say if todays date is 13/04/10,
it will return period P1. (as its between 05/04/10 - 03/05/10)


What i am trying to do, is to now work out the week number , which
should be week 2 (as its between 12/04/10 - 19/04/10)


Any help fully appriciated.


Thanks- Hide quoted text -


- Show quoted text -




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Calculating a week between a range of dates

On Tue, 13 Apr 2010 02:54:36 -0700 (PDT), Terry Tibbs
wrote:

Hi,

I have a little table which looks up a period number, and also has 4
columns for the week numbers of the period.

Example

Period week 1 week 2 week 3 week4
P1 05/04/10 12/04/10 19/04/10 26/04/10
P2 03/05/10 10/05/10 17/05/10 24/05/10

I have worked out a simple formala, to say if todays date is 13/04/10,
it will return period P1. (as its between 05/04/10 - 03/05/10)

What i am trying to do, is to now work out the week number , which
should be week 2 (as its between 12/04/10 - 19/04/10)

Any help fully appriciated.

Thanks


There may be simpler methods.

1. Name your data table
Tbl

2. Define a name
InnerTbl

refers to: =OFFSET(Tbl,1,1,ROWS(Tbl)-1,COLUMNS(Tbl)-1)

3. Period:

=INDEX(Tbl,MATCH(VLOOKUP(Dt,InnerTbl,1),OFFSET(Inn erTbl,,,,1))+1,1)

4. Week

=INDEX(Tbl,1,MATCH(Dt,OFFSET(Tbl,MATCH(VLOOKUP(Dt, InnerTbl,1),OFFSET(InnerTbl,,,,1),0),,1,)))

--ron
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
Convert regular Date to Week Ending or Week Beginning Dates Sam H Excel Discussion (Misc queries) 5 April 3rd 23 04:39 PM
Calculating hours per week spent by a resource The Fool on the Hill Excel Discussion (Misc queries) 2 February 17th 10 09:52 AM
Calculating tasks using a six day work week Steve22055 Excel Discussion (Misc queries) 1 March 25th 09 05:00 PM
Calculating the first day of the week jimbo New Users to Excel 5 December 30th 08 02:51 PM
need to convert list of dates to count no. of dates by week neowok Excel Worksheet Functions 13 January 30th 06 03:54 PM


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