Relate a date to a date range

troy_lee

Board Regular
Joined
Feb 6, 2008
Messages
169
On worksheet B I have a cell with the formula:
Code:
TODAY()
.

On worksheet A I have a table with lots of different calendar information. In column B of this sheet is the work week beginning date, always a Monday. In column C is the work week ending date, always a Friday. I want to take the current date from worksheet B and return the row number in Worksheet A where today's date falls in between the week dates in Column B and C.

Thanks in advance for the help.

TL
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Domski

Well-known Member
Joined
Jan 18, 2005
Messages
7,292
Try something like:

=MATCH(A1,'Worksheet A'!$B$2:$B$30,1)

Dom
 

troy_lee

Board Regular
Joined
Feb 6, 2008
Messages
169
Doesn't quite work with what I've got. I looked for this date as a test, 3/4/10. This date falls between 3/1/10 (Column B) and 3/5/10 (Column C) on my sheet. Excel returned a row reference a few rows before this one. Should I change the dates to a long integer first and then perform the Match?
 

Domski

Well-known Member
Joined
Jan 18, 2005
Messages
7,292
The match formula returns the index number of the item relative to it's position in the array of data, hence if your data starts in row 2 and it the match it finds is in row 5 the index that it will return will be 4. Do you mean that you require the actual sheet row number? Can I ask what you are planning to use this for?

Dom
 

Watch MrExcel Video

Forum statistics

Threads
1,132,908
Messages
5,655,898
Members
418,250
Latest member
Jebacmakro

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
Top