Need a Formula to Lookup the week number that a day falls under between two dates

Robnrolla

New Member
Joined
Jul 16, 2017
Messages
13
[TABLE="width: 880"]
<colgroup><col><col span="4"><col span="9"><col></colgroup><tbody>[TR]
[TD]Week[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Day[/TD]
[TD="align: right"]Sun[/TD]
[TD="align: right"]Mon[/TD]
[TD="align: right"]Tue[/TD]
[TD="align: right"]Wed[/TD]
[TD="align: right"]Thu[/TD]
[TD="align: right"]Fri[/TD]
[TD="align: right"]Sat[/TD]
[TD="align: right"]Sun[/TD]
[TD="align: right"]Mon[/TD]
[TD="align: right"]Tue[/TD]
[TD="align: right"]Wed[/TD]
[TD="align: right"]Thu[/TD]
[TD="align: right"]Fri[/TD]
[TD="align: right"]Sat[/TD]
[/TR]
[TR]
[TD]From:[/TD]
[TD="align: right"]28 May 17[/TD]
[TD="align: right"]29 May 17[/TD]
[TD="align: right"]30 May 17[/TD]
[TD="align: right"]31 May 17[/TD]
[TD="align: right"]1 Jun 17[/TD]
[TD="align: right"]2 Jun 17[/TD]
[TD="align: right"]3 Jun 17[/TD]
[TD="align: right"]4 Jun 17[/TD]
[TD="align: right"]5 Jun 17[/TD]
[TD="align: right"]6 Jun 17[/TD]
[TD="align: right"]7 Jun 17[/TD]
[TD="align: right"]8 Jun 17[/TD]
[TD="align: right"]9 Jun 17[/TD]
[TD="align: right"]10 Jun 17[/TD]
[/TR]
[TR]
[TD]To:[/TD]
[TD="align: right"]28 May 17[/TD]
[TD="align: right"]29 May 17[/TD]
[TD="align: right"]30 May 17[/TD]
[TD="align: right"]31 May 17[/TD]
[TD="align: right"]1 Jun 17[/TD]
[TD="align: right"]2 Jun 17[/TD]
[TD="align: right"]3 Jun 17[/TD]
[TD="align: right"]4 Jun 17[/TD]
[TD="align: right"]5 Jun 17[/TD]
[TD="align: right"]6 Jun 17[/TD]
[TD="align: right"]7 Jun 17[/TD]
[TD="align: right"]8 Jun 17[/TD]
[TD="align: right"]9 Jun 17[/TD]
[TD="align: right"]10 Jun 17[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Week[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]11[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]From:[/TD]
[TD="align: right"]28 May 17[/TD]
[TD="align: right"]4 Jun 17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]To:[/TD]
[TD="align: right"]3 Jun 17[/TD]
[TD="align: right"]10 Jun 17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]

[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I need a formula to go from B1:O1 that will lookup the day in the week range and find the week number.

I originally tried an If formula with an Index to find greater than the From date and less than the To date and then an index match match to pull back the week number. This did not work for me. Perhaps i did this wrong?

Can anyone please help me?

Thanks,
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
there is a function for that > =WEEKNUM(A1) there must be a modification to do the financial year
 
Upvote 0
You can lookup the date in the from dates and find the corresponding week number above, e.g. if from dates are in B7:Z7 and corresponding week numbers in B6:Z6 then use this formula in B1 copied across

=LOOKUP(B2,$B7:$Z7,$B6:$Z6)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top