Can not get my formula to work

Jenndall

New Member
Joined
Aug 15, 2019
Messages
2
=+IF(AND(C8<=M13,C3="KY",DATEDIF(C8,C9,"D")<=90),"Y",
IF(AND(C8>=M13,C3="KY",DATEDIF(C8,C9,"D")<=45),"Y","N"))

My problem is if C8 is less than M13 AND less than 90 days should be Y and greater than 90 should be N (this is working fine)

The second part is not working if C8 is greater than M13 and less than 90 days should be Y if greater than 90 should be N (It is calculating Y for both greater and less than 45)

HELP PLEASE! It's driving me crazy. I hope this is enough info for you experts out there!
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi, welcome to the board.

With 3 variables it looks like you have at least 12 possible scenarios.

What should the answers be for EACH of these scenarios ?

C8...........C3.............DATEDIF(C8,C9,"D")
<=M13........KY.............100
<=M13........KY..............80
<=M13........KY..............20
<=M13........NOT KY......100
<=M13........NOT KY........80
<=M13........NOT KY........20
>M13..........KY.............100
>M13..........KY..............80
>M13..........KY..............20
>M13..........NOT KY......100
>M13..........NOT KY........80
>M13..........NOT KY........20
 
Upvote 0
C8...........C3.............DATEDIF(C8,C9,"D")

<=M13........KY.............100 N
<=M13........KY..............80 Y
<=M13........KY..............20 Y
<=M13........NOT KY......100 dosent matter if its not KY there is more to the formula for other states
<=M13........NOT KY........80
<=M13........NOT KY........20
>M13..........KY.............100 N
>M13..........KY..............80 N
>M13..........KY..............20 Y
>M13..........NOT KY......100
>M13..........NOT KY........80
>M13..........NOT KY........20


I really appreciate the help!
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,457
Members
449,083
Latest member
Ava19

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