# Lookup Between Date Range

##### New Member
Hi Awesome People,

I'm having difficulty tuning a lookup function to return a cell based on a date range as seen in example below:

What I am trying to archive is the value in column 'C' if column 'B' falls within the start and end date of E:F. If it doesnt fall within this date range must return "N/A" (for example).

The formula I am using is: =LOOKUP(2,1/(B3>=E4)*(B3<=F4),C3)

The issue with the formula above is its giving the result (what's in column "C") regardless if it falls within the date parameters or not.

Column "I":"M" is where I want to post the formula (results are examples of what must display.

 REF ACTION_DATE RESULT STARD END REF Feb-19​ Mar-19​ Apr-19​ May-19​ Jun-19​ 1​ 2019/02/25​ Successful 2019/01/01​ 2019/01/31​ 1​ Successful Successful Unsuccessful Successful Unsuccessful 1​ 2019/03/25​ Successful 2019/02/01​ 2019/02/28​ 2​ N/A Unsuccessful N/A N/A N/A 1​ 2019/04/25​ Unsuccessful 2019/03/01​ 2019/03/31​ 3​ N/A N/A N/A Successful Successful 1​ 2019/05/25​ Successful 2019/04/01​ 2019/04/30​ 1​ 2019/06/25​ Unsuccessful 2019/05/01​ 2019/05/31​ =LOOKUP(2,1/(B3>=E4)*(B3<=F4),C3) 2​ 2019/03/25​ Unsuccessful 2019/06/01​ 2019/06/30​ 3​ 2019/05/25​ Successful 2019/07/01​ 2019/07/31​ 3​ 2019/06/25​ Successful 2019/08/01​ 2019/08/31​ 2019/09/01​ 2019/09/30​ 2019/10/01​ 2019/10/31​ 2019/11/01​ 2019/11/30​ 2019/12/01​ 2019/12/31​

### Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

#### Special-K99

##### Well-known Member
Shouldn't it be - note extra brackets

=LOOKUP(2,1/((B3>=E4)*(B3<=F4)),C3)

So the conditions get executed first
((B3>=E4)*(B3<=F4))
Then the result gets passed to the 1/ part of the formula

I know you're thining hang on, division and multiplication, order doesn';t matter
But in this case I think it does as there's a "logic" function going on here

##### New Member
Thank you, highly appreciated.

You are 100% correct. works perfect.

Replies
1
Views
62
Replies
1
Views
96
Replies
3
Views
237
Replies
3
Views
163
Replies
0
Views
218

1,141,128
Messages
5,704,446
Members
421,350
Latest member
jake9951

### 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.

### Which adblocker are you using?

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

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