Return value if date/value falls in range

DavidvanR

New Member
Joined
Jun 30, 2017
Messages
2
Hi everybody,

I hope someone can help me out here with the following issue. I would like to return the value D2 in J2 if the following condition is met J$1 >B2, J$1<C2. And I want to do the same for the values E2, F2, G, H2, I2 for the subsequent cells after J2. So if header J1 "1980" falls in the range of B2 and C2.

[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 2290"]
<colgroup><col span="3"><col><col><col><col><col><col><col span="5"><col></colgroup><tbody>[TR]
[TD]Var_ID[/TD]
[TD]Var_Startyear[/TD]
[TD]Var_Ending_year[/TD]
[TD]D) Var_Occupation_1_digit[/TD]
[TD]E)
Var_Occupation_2_digit[/TD]
[TD]F)
Var_Occupation_3_digit[/TD]
[TD]G)
Var_Comp_TYPE[/TD]
[TD]H)
Var_Comp_Sector[/TD]
[TD]I)
Var_Comp_INDUSTRY[/TD]
[TD]J)
1980[/TD]
[TD]K)
1980[/TD]
[TD]L)
1980[/TD]
[TD]M)
1980[/TD]
[TD]O)
1980[/TD]
[TD]P)
1980[/TD]
[/TR]
[TR]
[TD]1000001[/TD]
[TD]2015[/TD]
[TD]2016[/TD]
[TD]2[/TD]
[TD]24[/TD]
[TD]241[/TD]
[TD]5[/TD]
[TD]4[/TD]
[TD]42[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000002[/TD]
[TD]#NULL![/TD]
[TD][/TD]
[TD]4[/TD]
[TD]43[/TD]
[TD]431[/TD]
[TD]#NULL![/TD]
[TD]#NULL![/TD]
[TD]#NULL![/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000003[/TD]
[TD]1979[/TD]
[TD]2000[/TD]
[TD]9[/TD]
[TD]99[/TD]
[TD]999[/TD]
[TD]4[/TD]
[TD]4[/TD]
[TD]41[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000004[/TD]
[TD]#NULL![/TD]
[TD][/TD]
[TD]3[/TD]
[TD]33[/TD]
[TD]332[/TD]
[TD]6[/TD]
[TD]1[/TD]
[TD]13[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000005[/TD]
[TD]2013[/TD]
[TD]2016[/TD]
[TD]3[/TD]
[TD]33[/TD]
[TD]331[/TD]
[TD]6[/TD]
[TD]4[/TD]
[TD]41[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000006[/TD]
[TD]2015[/TD]
[TD]2016[/TD]
[TD]6[/TD]
[TD]61[/TD]
[TD]610[/TD]
[TD]6[/TD]
[TD]1[/TD]
[TD]11[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000007[/TD]
[TD]2012[/TD]
[TD]2016[/TD]
[TD]1[/TD]
[TD]19[/TD]
[TD]199[/TD]
[TD]6[/TD]
[TD]4[/TD]
[TD]41[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000008[/TD]
[TD]2016[/TD]
[TD]2016[/TD]
[TD]6[/TD]
[TD]63[/TD]
[TD]630[/TD]
[TD]6[/TD]
[TD]1[/TD]
[TD]11[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000009[/TD]
[TD]#NULL![/TD]
[TD][/TD]
[TD]1[/TD]
[TD]12[/TD]
[TD]121[/TD]
[TD]6[/TD]
[TD]1[/TD]
[TD]13[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000010[/TD]
[TD]#NULL![/TD]
[TD][/TD]
[TD]3[/TD]
[TD]33[/TD]
[TD]331[/TD]
[TD]6[/TD]
[TD]4[/TD]
[TD]42[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000011[/TD]
[TD]2011[/TD]
[TD]2016[/TD]
[TD]3[/TD]
[TD]33[/TD]
[TD]331[/TD]
[TD]6[/TD]
[TD]4[/TD]
[TD]42[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000012[/TD]
[TD]#NULL![/TD]
[TD][/TD]
[TD]3[/TD]
[TD]33[/TD]
[TD]331[/TD]
[TD]6[/TD]
[TD]4[/TD]
[TD]41[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000013[/TD]
[TD]2016[/TD]
[TD]2016[/TD]
[TD]9[/TD]
[TD]99[/TD]
[TD]999[/TD]
[TD]6[/TD]
[TD]4[/TD]
[TD]42[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000014[/TD]
[TD]2006[/TD]
[TD]2016[/TD]
[TD]2[/TD]
[TD]24[/TD]
[TD]241[/TD]
[TD]6[/TD]
[TD]4[/TD]
[TD]42[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000015[/TD]
[TD]2014[/TD]
[TD]2016[/TD]
[TD]2[/TD]
[TD]24[/TD]
[TD]241[/TD]
[TD]6[/TD]
[TD]2[/TD]
[TD]21[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000016[/TD]
[TD]#NULL![/TD]
[TD][/TD]
[TD]2[/TD]
[TD]24[/TD]
[TD]241[/TD]
[TD]6[/TD]
[TD]4[/TD]
[TD]42[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000017[/TD]
[TD]2016[/TD]
[TD]2016[/TD]
[TD]2[/TD]
[TD]24[/TD]
[TD]241[/TD]
[TD]6[/TD]
[TD]1[/TD]
[TD]13[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1000018[/TD]
[TD]1980[/TD]
[TD]1981[/TD]
[TD]3[/TD]
[TD]33[/TD]
[TD]331[/TD]
[TD]6[/TD]
[TD]4[/TD]
[TD]41[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[/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]
</tbody>[/TABLE]


Thanks a lot in advanced!!

Kind regards, David
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
So header year J1 is 1980 and should fall in the range of start year and end year. Then I would like to return the numerical values in Column J.
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,988
Members
452,373
Latest member
TimReeks

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