Logic question

P

palhota

Hello all. How can I represent in the function bar the following logical
function?

If ((month(x) < 8)or (month(x)=8 and day(x)<8))

Thanks a lot in advance
 
J

JE McGimpsey

Oops, misread month(x)=8 for month(x)>=8.

Try:

=IF(OR(MONTH(x)<8,AND(MONTH(x)=8,DAY(x)<8)), "Yes", "No")

instead.

Alternatively:

=IF(DATE(9999,MONTH(x),DAY(x))<DATE(9999,8,8),"Yes","No")
 
R

Roger Govier

Hi JE

I may have interpreted the OP incorrectly, but I assumed that it was only
for Month = 8, the the Day could be less than 8.
I dismissed the same formula myself, as, if my interpretation is correct,
days 1 to 7 of Sep through Dec would return false true's.
 
R

Rick Rothstein

Let's assume 'x' is the cell reference A1 for this example and that it
contains a real date, then I would think you could use this...

=IF(A1<DATE(YEAR(A1),8,8),"It's True","It's False")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top