ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Logic question (https://www.excelbanter.com/excel-worksheet-functions/207017-logic-question.html)

palhota

Logic question
 
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

Mike H

Logic question
 
Maybe

=IF(OR(MONTH(A1)<8,AND(MONTH(A1)=8,DAY(A1)<8)),"Do This","Do That")

Mike

"palhota" wrote:

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


JE McGimpsey

Logic question
 
One way:

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

In article ,
palhota wrote:

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


JE McGimpsey

Logic question
 
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")

In article ,
JE McGimpsey wrote:

One way:

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

In article ,
palhota wrote:

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


Roger Govier[_3_]

Logic question
 
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.

--
Regards
Roger Govier

"JE McGimpsey" wrote in message
...
One way:

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

In article ,
palhota wrote:

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



Rick Rothstein

Logic question
 
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")

--
Rick (MVP - Excel)


"palhota" wrote in message
...
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




All times are GMT +1. The time now is 10:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com