Look Up with If Statement formula

jevi

Active Member
Joined
Apr 13, 2010
Messages
339
Office Version
  1. 2016
Platform
  1. Windows
[TABLE="width: 360"]
<colgroup><col><col span="2"><col span="2"></colgroup><tbody>[TR]
[TD="align: right"] 05/11/2018[/TD]
[TD][/TD]
[TD]Ann[/TD]
[TD="align: right"]01/11/2018[/TD]
[TD="align: right"] -06/11/2018[/TD]
[/TR]
[TR]
[TD]Ann[/TD]
[TD][/TD]
[TD]Ann[/TD]
[TD="align: right"]01/12/2018[/TD]
[TD="align: right"] -02/12/2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Sam[/TD]
[TD="align: right"]24/12/2018[/TD]
[TD="align: right"] -24/12/2018[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Sam[/TD]
[TD="align: right"]28/12/2018[/TD]
[TD="align: right"] -28/12/2018
[/TD]
[/TR]
</tbody>[/TABLE]

=LOOKUP(3;2/($D$1:$D$4<=A1)/($E$1:$E$4>=A1);$C$1:$C$4)

Hi all,

I am looking for a formula that needs to check if the date 05/11/2018 is in the whole range starting from 01/11/2018 to 28/12/2018 and if the name below the date 05/11/2018 matches that in the column name.

I tried the above formula but is not working.

Thank you for your help.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Try


[Table="class: grid"][tr][td="bgcolor: #DCE6F1"][/td][td="bgcolor: #DCE6F1"]
A
[/td][td="bgcolor: #DCE6F1"]
B
[/td][td="bgcolor: #DCE6F1"]
C
[/td][td="bgcolor: #DCE6F1"]
D
[/td][td="bgcolor: #DCE6F1"]
E
[/td][/tr]
[tr][td="bgcolor: #DCE6F1"]
1
[/td][td]
05/11/2018​
[/td][td][/td][td]
Ann​
[/td][td]
01/11/2018​
[/td][td]
06/11/2018​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
2
[/td][td]
Ann​
[/td][td][/td][td]
Ann​
[/td][td]
01/12/2018​
[/td][td]
02/12/2018​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
3
[/td][td][/td][td][/td][td]
Sam​
[/td][td]
24/12/2018​
[/td][td]
24/12/2018​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
4
[/td][td][/td][td][/td][td]
Sam​
[/td][td]
28/12/2018​
[/td][td]
28/12/2018​
[/td][/tr]
[/table]


Formula in A2
=INDEX(C$1:C$4,MATCH(1,INDEX((E$1:E$4>=A1)*(A1>=D$1:D$4),),0))

Hope this helps

M.
 
Upvote 0
Thank you Marcello, but your formula gives the same result as mine:)...but I would like the formula to be in A3 and give the result only if A2 is in column C and also the date A1 is in the range of dates. So need to have two conditions matched. Like put a Yes maybe in A3 if A2 is in column C1:C4 and A1 is in the range D1:E4
 
Upvote 0
It works great:). Just the result I was hoping for. It is a pitty though that Countifs doesn't work with closed workbook but I will copy the data to the same book where I need to use the formula.

Thank you so much for your help:)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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