Lookup in a Date Range

cmajka

Board Regular
Joined
Mar 18, 2013
Messages
175
Hi All,

I'm trying to find a way to look in the dataset and if the date falls within a certain date range, then I want to return that corresponding value. In column A, I have set up the beginning date, for example 3/31/2013. In Column B, I have set up the ending date, i.e., 4/06/2013. So, if a value in the dataset falls within that date range, then return the value.

Thanks

C
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Not sure what you plan to do with the data after you get it, but take a look at the advanced filter function.
 
Upvote 0
Let's say I have 12 weeks worth of data. Each week of data needs to be separated onto it's own tab. Ultimately, I want to split one large dataset into 12 small datasets by date range. This dataset will be updated each week so doing it manually is not something that's feasible. If i can just plop the new dataset into a tab, and have the other 12 tabs update automatically with their respective week's worth of data.
 
Upvote 0
Let's say I have 12 weeks worth of data. Each week of data needs to be separated onto it's own tab. Ultimately, I want to split one large dataset into 12 small datasets by date range. This dataset will be updated each week so doing it manually is not something that's feasible. If i can just plop the new dataset into a tab, and have the other 12 tabs update automatically with their respective week's worth of data.

Such should be done with code in VBA, although it's also doable with formulas. Try to adapt from post #3 of:

http://www.mrexcel.com/forum/excel-questions/307832-multiple-vlookups.html#post1511354

for a formula set up.
 
Upvote 0
I was trying to do the exact same thing. I tried a lot of different methods, and I discovered that it's a huge pain in the buns. My simplistic but highly effective solution was to construct a table that had every day in the range listed, with the period reference number for every day right next to it. Use a lookup to append the period reference to the appropriate rows in your raw dataset. Lookup against the period reference number instead of the date, voila. I'm sure there's a more sophisticated and complex way of doing it, but is it honestly worth the time? I don't think so.
 
Upvote 0

Forum statistics

Threads
1,203,550
Messages
6,056,050
Members
444,841
Latest member
SF_Marnie

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