ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If...and... - can never get the syntax correct! (https://www.excelbanter.com/excel-programming/326103-if-can-never-get-syntax-correct.html)

Darin Kramer

If...and... - can never get the syntax correct!
 


Howdie

Spreadsheet 1 columns and 2 rows.
In A2, either a yes or no
In A3 either a yes or no
I need to put in A4 formulae that will tell me:
If a2 = a3 are equal,put "okay".
If a2 = No, and a3 = yes, Put "problem"
If a2 = Yes and a3 = No, put "okay"

Thanks so much

D



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

JulieD

If...and... - can never get the syntax correct!
 
Hi Darin

=IF(OR(A2=A3,AND(A2="Yes",A3="No")),"okay",IF(AND( A2="No",A3="Yes"),"problem","not
sure"))

Cheers
JulieD


"Darin Kramer" wrote in message
...


Howdie

Spreadsheet 1 columns and 2 rows.
In A2, either a yes or no
In A3 either a yes or no
I need to put in A4 formulae that will tell me:
If a2 = a3 are equal,put "okay".
If a2 = No, and a3 = yes, Put "problem"
If a2 = Yes and a3 = No, put "okay"

Thanks so much

D



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




Charlie

If...and... - can never get the syntax correct!
 

=IF(OR(A2=A3,A2="Yes"),"Okay","Problem")


"Darin Kramer" wrote:



Howdie

Spreadsheet 1 columns and 2 rows.
In A2, either a yes or no
In A3 either a yes or no
I need to put in A4 formulae that will tell me:
If a2 = a3 are equal,put "okay".
If a2 = No, and a3 = yes, Put "problem"
If a2 = Yes and a3 = No, put "okay"

Thanks so much

D



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Bob Phillips[_6_]

If...and... - can never get the syntax correct!
 
Hi Julie,

The not sure condition can never be met as stated by OP, you just need

=IF(OR(A2=A3,AND(A2="Yes",A3="No")),"okay","proble m")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JulieD" wrote in message
...
Hi Darin


=IF(OR(A2=A3,AND(A2="Yes",A3="No")),"okay",IF(AND( A2="No",A3="Yes"),"problem
","not
sure"))

Cheers
JulieD


"Darin Kramer" wrote in message
...


Howdie

Spreadsheet 1 columns and 2 rows.
In A2, either a yes or no
In A3 either a yes or no
I need to put in A4 formulae that will tell me:
If a2 = a3 are equal,put "okay".
If a2 = No, and a3 = yes, Put "problem"
If a2 = Yes and a3 = No, put "okay"

Thanks so much

D



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!






Charlie

If...and... - can never get the syntax correct!
 
I don't think it needs to be that complex, as long as A2 and A3 MUST contain
either "Yes" or "No". If A2="Yes" it doesn't matter what's in A3.

"JulieD" wrote:

Hi Darin

=IF(OR(A2=A3,AND(A2="Yes",A3="No")),"okay",IF(AND( A2="No",A3="Yes"),"problem","not
sure"))

Cheers
JulieD


"Darin Kramer" wrote in message
...


Howdie

Spreadsheet 1 columns and 2 rows.
In A2, either a yes or no
In A3 either a yes or no
I need to put in A4 formulae that will tell me:
If a2 = a3 are equal,put "okay".
If a2 = No, and a3 = yes, Put "problem"
If a2 = Yes and a3 = No, put "okay"

Thanks so much

D



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





Bob Phillips[_6_]

If...and... - can never get the syntax correct!
 
or even

=IF(OR(A2=A3,A2="Yes),"okay","problem")


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Bob Phillips" wrote in message
...
Hi Julie,

The not sure condition can never be met as stated by OP, you just need

=IF(OR(A2=A3,AND(A2="Yes",A3="No")),"okay","proble m")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JulieD" wrote in message
...
Hi Darin



=IF(OR(A2=A3,AND(A2="Yes",A3="No")),"okay",IF(AND( A2="No",A3="Yes"),"problem
","not
sure"))

Cheers
JulieD


"Darin Kramer" wrote in message
...


Howdie

Spreadsheet 1 columns and 2 rows.
In A2, either a yes or no
In A3 either a yes or no
I need to put in A4 formulae that will tell me:
If a2 = a3 are equal,put "okay".
If a2 = No, and a3 = yes, Put "problem"
If a2 = Yes and a3 = No, put "okay"

Thanks so much

D



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!








Charlie

If...and... - can never get the syntax correct!
 
Now you got it!

"Bob Phillips" wrote:

or even

=IF(OR(A2=A3,A2="Yes),"okay","problem")


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Bob Phillips" wrote in message
...
Hi Julie,

The not sure condition can never be met as stated by OP, you just need

=IF(OR(A2=A3,AND(A2="Yes",A3="No")),"okay","proble m")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JulieD" wrote in message
...
Hi Darin



=IF(OR(A2=A3,AND(A2="Yes",A3="No")),"okay",IF(AND( A2="No",A3="Yes"),"problem
","not
sure"))

Cheers
JulieD


"Darin Kramer" wrote in message
...


Howdie

Spreadsheet 1 columns and 2 rows.
In A2, either a yes or no
In A3 either a yes or no
I need to put in A4 formulae that will tell me:
If a2 = a3 are equal,put "okay".
If a2 = No, and a3 = yes, Put "problem"
If a2 = Yes and a3 = No, put "okay"

Thanks so much

D



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!








JulieD

If...and... - can never get the syntax correct!
 
if one of A2 or A3 DOESN'T contain either Yes or No and the one other does,
you get a false result .... can we "assume" that both will be filled with
only these values? - maybe the OPs cells to check at BA23 and AL1245 ... and
they want to know the result in A1.

anyway, the OP can choose which one to use


"Charlie" wrote in message
...
I don't think it needs to be that complex, as long as A2 and A3 MUST
contain
either "Yes" or "No". If A2="Yes" it doesn't matter what's in A3.

"JulieD" wrote:

Hi Darin

=IF(OR(A2=A3,AND(A2="Yes",A3="No")),"okay",IF(AND( A2="No",A3="Yes"),"problem","not
sure"))

Cheers
JulieD


"Darin Kramer" wrote in message
...


Howdie

Spreadsheet 1 columns and 2 rows.
In A2, either a yes or no
In A3 either a yes or no
I need to put in A4 formulae that will tell me:
If a2 = a3 are equal,put "okay".
If a2 = No, and a3 = yes, Put "problem"
If a2 = Yes and a3 = No, put "okay"

Thanks so much

D



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!







JulieD

If...and... - can never get the syntax correct!
 
Hi Bob

the "not sure" condition can be met under the following circumstances
AND(A2="No", A3="")
AND(A2="No",A3="Yes ")
AND(A2=" ",A3="No")

etc .... as we don't know the "real" range that the OP is going to apply the
solution to i thought it prudent to check that they only get the requested
result when the data matches what they asked for.

anyway the OP can decide which formula to use :)

Cheers
JulieD

"Bob Phillips" wrote in message
...
Hi Julie,

The not sure condition can never be met as stated by OP, you just need

=IF(OR(A2=A3,AND(A2="Yes",A3="No")),"okay","proble m")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JulieD" wrote in message
...
Hi Darin


=IF(OR(A2=A3,AND(A2="Yes",A3="No")),"okay",IF(AND( A2="No",A3="Yes"),"problem
","not
sure"))

Cheers
JulieD


"Darin Kramer" wrote in message
...


Howdie

Spreadsheet 1 columns and 2 rows.
In A2, either a yes or no
In A3 either a yes or no
I need to put in A4 formulae that will tell me:
If a2 = a3 are equal,put "okay".
If a2 = No, and a3 = yes, Put "problem"
If a2 = Yes and a3 = No, put "okay"

Thanks so much

D



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!








Darin Kramer

If...and... - can never get the syntax correct!
 
Thanks all for your input,thought and ultimately the perfect solution!
It works!



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Bob Phillips[_6_]

If...and... - can never get the syntax correct!
 
Hi Judie,


"JulieD" wrote in message
...

the "not sure" condition can be met under the following circumstances
AND(A2="No", A3="")
AND(A2="No",A3="Yes ")
AND(A2=" ",A3="No")


as I said, as stated by the OP ...

In A2, either a yes or no
In A3 either a yes or no

anyway the OP can decide which formula to use :)


Well, he has few choices :-)



Charlie

If...and... - can never get the syntax correct!
 
can we "assume"...?

"JulieD" wrote:

... can we "assume" that both will be filled with
only these values? ...


In this case, yes.


"Darin Kramer" wrote in message
...

In A2, either a yes or no
In A3 either a yes or no



Bob Phillips[_6_]

If...and... - can never get the syntax correct!
 
Spell checker got me Julie, no offence :-)

Regards

Bod


"Bob Phillips" wrote in message
...
Hi Judie,


"JulieD" wrote in message
...

the "not sure" condition can be met under the following circumstances
AND(A2="No", A3="")
AND(A2="No",A3="Yes ")
AND(A2=" ",A3="No")


as I said, as stated by the OP ...

In A2, either a yes or no
In A3 either a yes or no

anyway the OP can decide which formula to use :)


Well, he has few choices :-)






All times are GMT +1. The time now is 02:27 PM.

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