help with lookup value between dates range

stzruya

New Member
Joined
Mar 8, 2018
Messages
8
Hi,
I need to lookup value in table and return value based on date range.
my table look like that:

NumberDate1Date2 Model
10902/12/200329/07/2005 A
10929/07/200523/11/2009 B
10923/11/200911/11/2010 C
10911/11/201019/12/2010 D
10919/12/201025/04/2013 E
10925/04/201324/03/2015 F
10924/03/201528/12/2050 G
11002/12/200329/07/2005 A
11029/07/200523/12/2009 B
11023/12/200902/11/2010 C
11002/11/201019/12/2010 D
11019/12/201021/03/2013 E
11021/03/201324/03/2015 F
11024/03/201520/05/2015 G
11020/05/201526/05/2015 H
11026/05/201528/12/2050 J

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
In other sheet i have list of numbers such as the numbers above (in column A) with specific date, based on that i need to return the model that was between that time.
for example for number 110 in the date 1/1/2010 the model was C.

is there any function that can do that or even macro that can help in that case.

thank you in advance

Samuel
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Excel 2010
ABCDEFGHI
1NumberDate1Date2Model
210912/2/20037/29/2005A
31097/29/200511/23/2009B1101/1/2010C
410911/23/200911/11/2010C
510911/11/201012/19/2010D
610912/19/20104/25/2013E
71094/25/20133/24/2015F
81093/24/201512/28/2050G
911012/2/20037/29/2005A
101107/29/200512/23/2009B
1111012/23/200911/2/2010C
1211011/2/201012/19/2010D
1311012/19/20103/21/2013E
141103/21/20133/24/2015F
151103/24/20155/20/2015G
161105/20/20155/26/2015H
171105/26/201512/28/2050J
Sheet1
Cell Formulas
RangeFormula
I3{=INDEX($D$2:$D$17,MATCH(G3,IF($B$2:$B$17<=H3,IF($C$2:$C$17>=H3,$A$2:$A$17))))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,175
Members
448,870
Latest member
max_pedreira

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