0

Seeking debugging help, I want a cell to output an X if the start date or due date fall within a certain month, however, when I run the formula on my column some cells do not have any text in them and they are outputting as "true". I need to fix the code so that the output in a cell that is blank (no text) is "false". here is what I have so far

=IF(OR(D5>=DATEVALUE("6/1/2017"), E5<=DATEVALUE("6/30/2017")), "X", "")

1 Answer 1

0

Use MONTH()

=IF(OR(MONTH(D5)=6,MONTH(E5)=6),"X","")

The issue is not limiting the dates to inside the month, to do it your way we need to bracket both dates:

=IF(OR(AND(D5>=DATEVALUE("6/1/2017"), D5<=DATEVALUE("6/30/2017")),AND(E5>=DATEVALUE("6/1/2017"), E5<=DATEVALUE("6/30/2017"))), "X", "")

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.