ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF Statement with two variables (https://www.excelbanter.com/excel-worksheet-functions/206656-if-statement-two-variables.html)

roadkill

IF Statement with two variables
 
I've gone brain dead on this.

Here is my formula, what am I doing wrong?

Thanks

=IF(H12="Tier 1" & J12="Yes",(150*B12),"None")

ExcelBanter AI

Answer: IF Statement with two variables
 
It looks like you're trying to use the AND function within your IF statement, but you're using the ampersand (&) instead of the correct syntax.

Here's the corrected formula:
  1. Formula:

    =IF(AND(H12="Tier 1"J12="Yes"), 150*B12"None"


In this formula, we're using the AND function to check if both H12 equals "Tier 1" and J12 equals "Yes". If both conditions are true, then the formula will return the result of 150 multiplied by the value in cell B12. If either condition is false, then the formula will return "None".

Glenn

IF Statement with two variables
 
RoadKill wrote:
I've gone brain dead on this.

Here is my formula, what am I doing wrong?

Thanks

=IF(H12="Tier 1" & J12="Yes",(150*B12),"None")




=IF(AND(H12="Tier 1",J12="Yes"),(150*B12),"None")

Bob Umlas[_2_]

IF Statement with two variables
 
=IF(AND(H12="Tier 1",J12="Yes"),150*B12,"None")
Bob Umlas
Excel MVP

"RoadKill" wrote in message
...
I've gone brain dead on this.

Here is my formula, what am I doing wrong?

Thanks

=IF(H12="Tier 1" & J12="Yes",(150*B12),"None")




Mike H

IF Statement with two variables
 
Hi

& is the concatenate symbol yo want AND

=IF(AND(H12="Tier 1",J12="Yes"),(150*B12),"None")

Mike

"RoadKill" wrote:

I've gone brain dead on this.

Here is my formula, what am I doing wrong?

Thanks

=IF(H12="Tier 1" & J12="Yes",(150*B12),"None")


Sean Timmons

IF Statement with two variables
 
Or if you want to be fancy:

=IF(H12&J12="Tier 1Yes",150*B12,"None")

"Glenn" wrote:

RoadKill wrote:
I've gone brain dead on this.

Here is my formula, what am I doing wrong?

Thanks

=IF(H12="Tier 1" & J12="Yes",(150*B12),"None")




=IF(AND(H12="Tier 1",J12="Yes"),(150*B12),"None")


Mike H

IF Statement with two variables
 

Fancy is fine if having "T" in H12 and "ier 1Yes" in J12 or any other of the
multiple other combinations is OK. I prefer evaluating the 2 conditions set
out by the OP



"Sean Timmons" wrote:

Or if you want to be fancy:

=IF(H12&J12="Tier 1Yes",150*B12,"None")

"Glenn" wrote:

RoadKill wrote:
I've gone brain dead on this.

Here is my formula, what am I doing wrong?

Thanks

=IF(H12="Tier 1" & J12="Yes",(150*B12),"None")




=IF(AND(H12="Tier 1",J12="Yes"),(150*B12),"None")


Sean Timmons

IF Statement with two variables
 
Well, sure, though the likelihood of that error would be relatively low, it
also would allow for such things as matching full names where middle may be
in one of two cells. Guess it all depends on the goal of the formula...

"Mike H" wrote:


Fancy is fine if having "T" in H12 and "ier 1Yes" in J12 or any other of the
multiple other combinations is OK. I prefer evaluating the 2 conditions set
out by the OP



"Sean Timmons" wrote:

Or if you want to be fancy:

=IF(H12&J12="Tier 1Yes",150*B12,"None")

"Glenn" wrote:

RoadKill wrote:
I've gone brain dead on this.

Here is my formula, what am I doing wrong?

Thanks

=IF(H12="Tier 1" & J12="Yes",(150*B12),"None")



=IF(AND(H12="Tier 1",J12="Yes"),(150*B12),"None")


Sean Timmons

IF Statement with two variables
 
Please see myriad responses to your post from a couple minutes ago. Should
cover you.

"RoadKill" wrote:

I've gone brain dead on this.

Here is my formula, what am I doing wrong?

Thanks

=IF(H12="Tier 1" & J12="Yes",(150*B12),"None")


roadkill

IF Statement with two variables
 
Works great, thanks Sean.

"Sean Timmons" wrote:

Or if you want to be fancy:

=IF(H12&J12="Tier 1Yes",150*B12,"None")

"Glenn" wrote:

RoadKill wrote:
I've gone brain dead on this.

Here is my formula, what am I doing wrong?

Thanks

=IF(H12="Tier 1" & J12="Yes",(150*B12),"None")




=IF(AND(H12="Tier 1",J12="Yes"),(150*B12),"None")



All times are GMT +1. The time now is 12:09 PM.

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