ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   More IF Statement questions (https://www.excelbanter.com/excel-discussion-misc-queries/97020-more-if-statement-questions.html)

Wonder

More IF Statement questions
 
Thanks for all your help on my other IF question but I have another.


I want to say the following:

If G4=Y and I4=Y, enter the valule of 2. But if G4=Y and I4=N, enter
the value of 1. But if G4=N and I4=Y, enter the value of 1. But if
G4=N and I4=N, enter the value of 0.


I tried to figure it out, but I really don't know.


Bob Phillips

More IF Statement questions
 
=IF(G4="Y",IF(I4="Y",2,1),IF(I4="Y",1,0))


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Wonder" wrote in message
ups.com...
Thanks for all your help on my other IF question but I have another.


I want to say the following:

If G4=Y and I4=Y, enter the valule of 2. But if G4=Y and I4=N, enter
the value of 1. But if G4=N and I4=Y, enter the value of 1. But if
G4=N and I4=N, enter the value of 0.


I tried to figure it out, but I really don't know.




Scott

More IF Statement questions
 
=IF(AND(G4="Y", I4="Y"),2,IF(AND(G4="N", I4="Y"),1,IF(AND(G4="Y",
I4="N"),1,0)))


Hope this helps.





"Wonder" wrote:

Thanks for all your help on my other IF question but I have another.


I want to say the following:

If G4=Y and I4=Y, enter the valule of 2. But if G4=Y and I4=N, enter
the value of 1. But if G4=N and I4=Y, enter the value of 1. But if
G4=N and I4=N, enter the value of 0.


I tried to figure it out, but I really don't know.



Wonder

More IF Statement questions
 
Both of those worked.....thank you so much.


Scott wrote:
=IF(AND(G4="Y", I4="Y"),2,IF(AND(G4="N", I4="Y"),1,IF(AND(G4="Y",
I4="N"),1,0)))


Hope this helps.





"Wonder" wrote:

Thanks for all your help on my other IF question but I have another.


I want to say the following:

If G4=Y and I4=Y, enter the valule of 2. But if G4=Y and I4=N, enter
the value of 1. But if G4=N and I4=Y, enter the value of 1. But if
G4=N and I4=N, enter the value of 0.


I tried to figure it out, but I really don't know.





All times are GMT +1. The time now is 07:21 PM.

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