ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   2 IF THEN STATEMENTS TOGETHER IN ONE FORMULA (https://www.excelbanter.com/excel-programming/365738-2-if-then-statements-together-one-formula.html)

A[_3_]

2 IF THEN STATEMENTS TOGETHER IN ONE FORMULA
 
Hi -

I'm having trouble figuring out the following formula


If F6 = b and If G6= b then put N otherwise put P BUT if F6= n and G6 =
n put N otherwise put P.

Does that make sense - having trouble with the double if then statement
- what do I put in between to connect them. I keep gettting an error...
thanks

A


A[_3_]

2 IF THEN STATEMENTS TOGETHER IN ONE FORMULA
 
Nevermind - I'm an idiot.


A wrote:
Hi -

I'm having trouble figuring out the following formula


If F6 = b and If G6= b then put N otherwise put P BUT if F6= n and G6 =
n put N otherwise put P.

Does that make sense - having trouble with the double if then statement
- what do I put in between to connect them. I keep gettting an error...
thanks

A



A[_3_]

2 IF THEN STATEMENTS TOGETHER IN ONE FORMULA
 
OK - I'm wrong again... I still can't get it to work. I thought this
would work but it didn't

=IF(F6="b",IF(G6="b","N", IF(F6="b",IF(G6="n","N"),
IF(F6="n",IF(G6="n","N",IF(F6="n",IF(G6=b,P))))))) )

The first 2 sets of IFs work (The first 4 IF Statements) which is why I
thought it worked, but if I change column F6 to n, it returns a FALSE.

Any help would be greatly appreciated.

Thanks
A


A wrote:
Nevermind - I'm an idiot.


A wrote:
Hi -

I'm having trouble figuring out the following formula


If F6 = b and If G6= b then put N otherwise put P BUT if F6= n and G6 =
n put N otherwise put P.

Does that make sense - having trouble with the double if then statement
- what do I put in between to connect them. I keep gettting an error...
thanks

A



Tim Williams

2 IF THEN STATEMENTS TOGETHER IN ONE FORMULA
 
=if(and(F6="b",G6="b"), "N", if(and(F6="n",G6="n"), "N", "P"))

or something like that

Tim


"A" wrote in message oups.com...
Hi -

I'm having trouble figuring out the following formula


If F6 = b and If G6= b then put N otherwise put P BUT if F6= n and G6 =
n put N otherwise put P.

Does that make sense - having trouble with the double if then statement
- what do I put in between to connect them. I keep gettting an error...
thanks

A




A[_3_]

2 IF THEN STATEMENTS TOGETHER IN ONE FORMULA
 
Thanks - I figured out in a round about way by having it return two
columns, one of which all says false and then another IF statement to
pick whichever column is not false. Not the best but it works


Tim Williams wrote:
=if(and(F6="b",G6="b"), "N", if(and(F6="n",G6="n"), "N", "P"))

or something like that

Tim


"A" wrote in message oups.com...
Hi -

I'm having trouble figuring out the following formula


If F6 = b and If G6= b then put N otherwise put P BUT if F6= n and G6 =
n put N otherwise put P.

Does that make sense - having trouble with the double if then statement
- what do I put in between to connect them. I keep gettting an error...
thanks

A




All times are GMT +1. The time now is 04:50 PM.

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