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

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

HackSlash

Active Member
Joined
Nov 18, 2016
Messages
360
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,191,117
Messages
5,984,743
Members
439,906
Latest member
Sekiro1899

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
Top