Checking if dates is between two others

RichardMGreen

Well-known Member
Joined
Feb 20, 2006
Messages
2,177
Hi all

I'm fairly certain that this has been asked before, but searching didn't give me anything.
I've got two columns (B & C) which contain the start and end dates for various weeks in the format dd/mm/yyyy. Column E has the week "name" in the format "d - d mmm".
I'm trying the get a cell to return the week name from column E if I input a specific date.

This is what I've got so far:-
=IF(AND(Dates_Data!$B$2:$B$100>=D3,Dates_Data!$C$2:$C$100<=D3),Dates_Data!$E$2:$E$100)
which has been done as an array formula, but it just gives me a False.
Anyone any ideas where I've gone wrong?

Here's a sample of data (I hope)
Code:
Week	Start Date	End Date	This week?	Column Name
1	01/04/2010	07/04/2010	FALSE	1 - 7 Apr
2	08/04/2010	14/04/2010	FALSE	8 - 14 Apr
3	15/04/2010	21/04/2010	FALSE	15 - 21 Apr
4	22/04/2010	28/04/2010	FALSE	22 - 28 Apr
5	29/04/2010	05/05/2010	FALSE	29 - 5 May
6	06/05/2010	12/05/2010	FALSE	6 - 12 May
7	13/05/2010	19/05/2010	FALSE	13 - 19 May
8	20/05/2010	26/05/2010	FALSE	20 - 26 May

The dates run all the way down to row 100.
 
Last edited:

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
I need to return the column name (which is column E in my spreadsheet and the last column on the table above).
 
Upvote 0
Not really, that will give me a day.
I'm looking to return the correct column name for any given date.
So, from the dates above, a date of 02/04/2010 will return "1 - 7 Apr"
 
Upvote 0
I Hope This will work...


Code:
Week	Start Date	End Date	This week?	Column Name
1	01/04/10	=b2+6		=TEXT(B2,"d -")&TEXT(C2,"d mmm")
2	=c2+1	=b3+6		=TEXT(B3,"d -")&TEXT(C3,"d mmm")
3	=c3+1	=b4+6		=TEXT(B4,"d -")&TEXT(C4,"d mmm")
4	=c4+1	=b5+6		=TEXT(B5,"d -")&TEXT(C5,"d mmm")
5	=c5+1	=b6+6		=TEXT(B6,"d -")&TEXT(C6,"d mmm")
6	=c6+1	=b6+6		=TEXT(B7,"d -")&TEXT(C7,"d mmm")
 
Upvote 0
Excel Workbook
ABCDEFGH
1WeekStart DateEnd DateThis week?Column Name
2101/04/201007/04/2010FALSE1 - 7 Apr18/04/201015 - 21 Apr
3208/04/201014/04/2010FALSE8 - 14 Apr
4315/04/201021/04/2010FALSE15 - 21 Apr
5422/04/201028/04/2010FALSE22 - 28 Apr
6529/04/201005/05/2010FALSE29 - 5 May
7606/05/201012/05/2010FALSE6 - 12 May
8713/05/201019/05/2010FALSE13 - 19 May
9820/05/201026/05/2010FALSE20 - 26 May
Sheet
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,862
Members
452,948
Latest member
UsmanAli786

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