IF statement

S

Smitty2

I HAVE 2 CELLS WITH DIFFERENT "IF" STATEMENTS
Cell Q73 reads
=IF(L73>=300000,"3000",IF(L73>=270000,"2700",IF(L73>=240000,"2400",IF(L73>=200000,"2000","0"))))
Cell Q74 reads
IF(L74>=200000,"3000",IF(L74>=170,000,"2700",IF(L74>=140000,"2400",IF(L74)>=100000,"2100","0"))))
Cell F66 has the number 1
Cell F67 has the number 2
I am trying to write a formula that says IF F66 is a "1" use the formula in
cell Q73 and if F66 is a "2" use the formula in Q74. I keep getting a 0 for
the answer so I figure it is not reading the formula because I have tested
the formula and it works. Any help is appreciated.
 
R

Ron@Buy

Try this:
=IF(OR(F66=0,F66>2),0,IF(F66=1,Q73,Q74))
If F66 is blank or does contain a number 1 or 2 you will get a 0
Hope this helps
 
J

Jacob Skaria

--Check your formulas in Q73 and Q74 and try...
--Check out whether F66 contains the numeric 1/2 or is rounded off to
display 1/2

=IF(F66=1,Q73,IF(F66=2,Q74,""))
 
S

Smitty2

Thanks, but this did not work. If L73 was 248000, the answer should be 2400
but it still comes back 0. Do you see anything else that might work?
 
S

Smitty2

Thanks, but this did not work. I forgot to tell you that I use Excel 2003.
If L73 was 248000, the answer should be 2400 but it still comes back 0. This
answer sounds very logical and I have tried it before but again, I get 0 for
the answer. I did check to see if it was rounding and it is not, it is just
the numeric. I just can't seem to get it to work the equation. Do you see
anything else that might work?
 
J

Jacob Skaria

Modify your formulas to

=LOOKUP(VALUE(L73),{0,200000,240000,270000,300000},
{0,2000,2400,2700,3000})

=LOOKUP(VALUE(L74),{0,100000,140000,170000,200000},
{0,2100,2400,2700,3000})

'and then apply
=IF(F66=1,Q73,IF(F66=2,Q74,""))
 
D

David Biddulph

You were writing text strings, not numbers. Get rid of the double quotes if
you want numbers.
 

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