Excel IF statements, with 3 conditions if a=true and b=true and c=true then d1 = ""

Viewed 114

I want to make an excel formula so that, I can test out 3 columns and if they are true then to set a new value to the 4rth column.

I have this formula:

=IF(AND(A1="ALFA ROMEO"; B1="159"; C1="55");D1="2016";D1="")

and I want to check if A1 and B1 and C1 are true then to set D1 equal to a certain value.

*I've tried many complex ways to achieve it but this formula is the only one that doesnt pop up an error, but still gives back the Value FALSE(Not in D1, but in the cell I tried it). I've also tried seperating with commas etc...

Any possible help or way I could achieve the check?

2 Answers

You're almost there, but you need to put this formula here in cell D1 in order to fill the value of D1:

=IF(AND(A1="ALFA ROMEO", B1=159, C1=55),2016,"")

Keep out: in my locale I'm working with commas, while you might be working with semicolons, so your actual formula might be (in cell D1):

=IF(AND(A1="ALFA ROMEO"; B1=159; C1=55);2016;"")

Also, no need to put numerical values (159, 55) as strings, as you can see.

Edit: about turning B1 into a string:

I've just created this formula:

=IF(TEXT(B1,"0")="159","TRUE","FALSE")

This allows you to convert B1 into text.

So, your formula might turn into something like:

=IF(AND(A1="ALFA ROMEO", TEXT(B1, "0")="159", TEXT(C1,"0")="55"),2016,"")

(Again, mind the locale settings (commas and semicolons))

It should come from the quote ("") around the number I've try this

=SI(ET(A1="ALFA ROMEO";B1=159;C1=55);2016;"")

and it worked for me (sorry it's in french).

Maybe try to change cell format from the column B and C. And also put the formula in cell D1 or in the cell you want the value.

Related