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 [TABLE="width: 328"]
<tbody>[TR]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]13/07/2018[/TD]
[TD="align: right"]07/07/2018[/TD]
[TD] Due this week[/TD]
[/TR]
[TR]
[TD="align: right"]06/07/2018[/TD]
[TD="align: right"]30/06/2018[/TD]
[TD]1 week late[/TD]
[/TR]
[TR]
[TD="align: right"]29/06/2018[/TD]
[TD="align: right"]23/06/2018[/TD]
[TD]2 weeks late[/TD]
[/TR]
[TR]
[TD="align: right"]22/06/2018[/TD]
[TD="align: right"]16/06/2018[/TD]
[TD]3 weeks late[/TD]
[/TR]
[TR]
[TD="align: right"]15/06/2018[/TD]
[TD="align: right"]09/06/2018[/TD]
[TD]4 weeks late[/TD]
[/TR]
[TR]
[TD="align: right"]08/06/2018[/TD]
[TD="align: right"]02/06/2018[/TD]
[TD]5 weeks late[/TD]
[/TR]
[TR]
[TD="align: right"]01/06/2018[/TD]
[TD="align: right"]26/05/2018[/TD]
[TD]6 weeks late[/TD]
[/TR]
[TR]
[TD="align: right"]25/05/2018[/TD]
[TD="align: right"]19/05/2018[/TD]
[TD]7 weeks late[/TD]
[/TR]
[TR]
[TD="align: right"]18/05/2018[/TD]
[TD="align: right"]12/05/2018[/TD]
[TD]8 weeks late[/TD]
[/TR]
[TR]
[TD="align: right"]11/05/2018[/TD]
[TD="align: right"]14/04/2018[/TD]
[TD]9-12 wks late[/TD]
[/TR]
[TR]
[TD="align: right"]13/04/2018[/TD]
[TD="align: right"]17/03/2018[/TD]
[TD]13-16 wks late[/TD]
[/TR]
[TR]
[TD="align: right"]16/03/2018[/TD]
[TD="align: right"]17/02/2018[/TD]
[TD]17-20 wks late[/TD]
[/TR]
[TR]
[TD="align: right"]16/02/2018[/TD]
[TD="align: right"]16/02/2017[/TD]
[TD]More than 21 weeks late[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
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,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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