Look for a date between two date ranges and return text (IF AND statment?)

JOJOFOS

New Member
Joined
Jul 20, 2018
Messages
2
I hope someone can help, I am trying to write a formula that looks at a date on one workbook(I4), then looks to see if the date falls between two dates on another workbook (Admin col A & B) and returns text showing on another cell if this is true (Admin col C), if false then look at the next row with the same query etc. I have tried using and IF AND formula, but I am obviously doing something wrong, if anyone could tell me how to write the formula for the if statement or tell me a quicker solution I would really appreciate it! :

=IF(AND(I4>=Admin!$A$31,I4<=Admin!$B$31),Admin!$C$31,IF(AND(I4>=Admin!$A$32,I4<=Admin!$B$32),Admin!$C$32,IF(AND(I4>=Admin!$A$33,I4<=Admin!$B$33),Admin!$C$33,IF(AND(I4>=Admin!$A$34,I4<=Admin!$B$34),Admin!$C$34,IF(AND(I4>=Admin!$A$35,I4<=Admin!$B$35),Admin!$C$35,IF(AND(I4>=Admin!$A$36,I4<=Admin!$B$36),Admin!$C$36,IF(AND(I4>=Admin!$A$37,I4<=Admin!$B$37),Admin!$C$37,IF(AND(I4>=Admin!$A$38,I4<=Admin!$B$38),Admin!$C$38,IF(AND(I4>=Admin!$A$39,I4<=Admin!$B$39),Admin!$C$39,IF(AND(I4>=Admin!$A$40,I4<=Admin!$B$40),Admin!$C$40,IF(AND(I4>=Admin!$A$41,I4<=Admin!$B$41),Admin!$C$41,IF(AND(I4>=Admin!$A$42,I4<=Admin!$B$42),Admin!$C$42,IF(AND(I4>=Admin!$A$43,I4<=Admin!$B$43),Admin!$C$43,IF(AND(I4>=Admin!$A$44,I4<=Admin!$B$44),Admin!$C$44,"Check date"))))))))))))))


A B C This commences on row 31
13/07/201807/07/2018 Due this week
06/07/201830/06/20181 week late
29/06/201823/06/20182 weeks late
22/06/201816/06/20183 weeks late
15/06/201809/06/20184 weeks late
08/06/201802/06/20185 weeks late
01/06/201826/05/20186 weeks late
25/05/201819/05/20187 weeks late
18/05/201812/05/20188 weeks late
11/05/201814/04/20189-12 wks late
13/04/201817/03/201813-16 wks late
16/03/201817/02/201817-20 wks late
16/02/201816/02/2017More than 21 weeks late

<tbody>
</tbody>
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Welcome to Mr Excel forum

See if this does what you need
=INDEX(Admin!$C$31:$C$43,MATCH(I4,Admin!$A$31:$A$43,-1))

Hope this helps

M.
 
Upvote 0

Forum statistics

Threads
1,215,020
Messages
6,122,709
Members
449,093
Latest member
Mnur

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