Using ranges within if statements? Help please!

Shelle

New Member
Joined
Nov 23, 2016
Messages
1
Hi!

I need a formula to go in each of the cells in row 2 which checks the above cell date in row 1 and gives a yes or no answer based on looking at the contents of columns A and B.
E.g. if the date in D1 is between any of the dates in column A and the consecutive cell in column B, return 'Yes'

DEFG
110-12-1611-12-16<strike></strike>12-12-16<strike></strike>13-12-16<strike></strike>
2YesYesNoNo

<tbody>
</tbody>

AB
410-12-16<strike></strike>11-12-16
521-12-1624-12-16
601-12-1605-12-16

<tbody>
</tbody>

So, logically (but not correctly)
=IF(AND(D1>=A4:A6,D1<=B4:B6),"Yes","No")

Thanks!
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
I think you need to add MIN and MAX to your IF.

If it's less than the MAX(B4:B6) and it's greater than the MIN(A4:A6)
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,286
Members
449,076
Latest member
kenyanscott

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