Multiple conditions in excel to return yes / no

Syrius

New Member
Joined
May 21, 2017
Messages
3
Hi all,

I hope you can help me. I am trying to get a yes / no value in the current conditions. I need to get a yes if the date (H2) is 8 months or over and equal to or under 12 months of the date(F2)and a no if the date (H2) is over 12 months. I currently have this on the go but I'm getting some false negatives. Any help would be much appreciated!

=IF(AND(MONTH(H2)<=(MONTH(F2+12)),MONTH(H2)>=(MONTH(F2+8))), "Yes", "No")
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Try something likethis?
IF(AND(H2<=edate(F2,12),H2>=edate(F2,8)), "Yes", "No")
 
Upvote 0
I really appreciate it, its been driving me nuts tying to figure it out! Obviously I was over complicating it.
 
Upvote 0
no problem. EDATE() and EOMONTH() are 2 functions that can be quite handy when working with date comparisons
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,607
Members
449,090
Latest member
vivek chauhan

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