Formula If statement.

C

C Kreig

I would like to get a formula
=IF((B1=X),(Value=0),IF(B2=X,(Value=5),IF(B3=X,(Value=10)))
I keep getting an error telling me that I am missing a parenthesis.

I would also like to add in the fomula that if it is blank do not calculate
the value.

Thank you in advance for your help.
 
J

JoeU2004

C Kreig said:
I would like to get a formula
=IF((B1=X),(Value=0),IF(B2=X,(Value=5),IF(B3=X,(Value=10)))
I keep getting an error telling me that I am missing a parenthesis.

First, it might be easier for you to spot your error if you eliminate
unneeded parentheses.

Second, I suspect you do not really have "Value=0" etc, unless you truly
intend the result to be TRUE or FALSE. And I suspect you do not have "X"
and "Value" verbatim, unless they are named references.

So I presume your intention is a formula of the form (including your syntax
error):

=IF(B1=1,0,IF(B2=2,5,IF(B3=3,10))

Now can you see the syntax error? You need one more right parenthesis to
close the first IF function.

I would also like to add in the fomula that if it is blank do not
calculate
the value.

I don't know what "it" is; you reference three different cells: B1, B2 and
B3.

Perhaps you mean: if none of the conditions is true, you want to display a
blank cell. Then:

=IF(B1=1,0,IF(B2=2,5,IF(B3=3,10,"")))


PS: For future reference, if you are asking for help with a syntax error,
it is prudent to copy-and-paste exactly what you are typing into Excel. If
you retype it, you are likely to obscure the original syntax error, either
creating new ones or even unconsciously correcting the original one.
 
S

Shane Devenshire

You formula and the accompaning description don't make sense.

1. First, can only one cellin the range B1:B3 contain X?
2. You say add in a formula if it is blank - if what is blank? what is "it"
3. Is X a range name or a text entry?
4. by Value=0 do you mean that if B1=X then return 0? If so what do you
want to do if B1:b3 ALL = x - SUM them Average them, take the largest result?

In general a formula might look like:

=IF(B1="X",0,IF(B2="X",5,IF(B3="X",10,"")))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top