ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF statement (https://www.excelbanter.com/excel-worksheet-functions/254952-if-statement.html)

Smitty2

IF statement
 
I HAVE 2 CELLS WITH DIFFERENT "IF" STATEMENTS
Cell Q73 reads
=IF(L73=300000,"3000",IF(L73=270000,"2700",IF(L7 3=240000,"2400",IF(L73=200000,"2000","0"))))
Cell Q74 reads
IF(L74=200000,"3000",IF(L74=170,000,"2700",IF(L7 4=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.

Ron@Buy

IF statement
 
Try this:
=IF(OR(F66=0,F662),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

"Smitty2" wrote:

I HAVE 2 CELLS WITH DIFFERENT "IF" STATEMENTS
Cell Q73 reads
=IF(L73=300000,"3000",IF(L73=270000,"2700",IF(L7 3=240000,"2400",IF(L73=200000,"2000","0"))))
Cell Q74 reads
IF(L74=200000,"3000",IF(L74=170,000,"2700",IF(L7 4=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.


Jacob Skaria

IF statement
 
--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,""))

--
Jacob


"Smitty2" wrote:

I HAVE 2 CELLS WITH DIFFERENT "IF" STATEMENTS
Cell Q73 reads
=IF(L73=300000,"3000",IF(L73=270000,"2700",IF(L7 3=240000,"2400",IF(L73=200000,"2000","0"))))
Cell Q74 reads
IF(L74=200000,"3000",IF(L74=170,000,"2700",IF(L7 4=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.


Smitty2

IF statement
 
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?

"Ron@Buy" wrote:

Try this:
=IF(OR(F66=0,F662),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

"Smitty2" wrote:

I HAVE 2 CELLS WITH DIFFERENT "IF" STATEMENTS
Cell Q73 reads
=IF(L73=300000,"3000",IF(L73=270000,"2700",IF(L7 3=240000,"2400",IF(L73=200000,"2000","0"))))
Cell Q74 reads
IF(L74=200000,"3000",IF(L74=170,000,"2700",IF(L7 4=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.


Smitty2

IF statement
 
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?


"Jacob Skaria" wrote:

--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,""))

--
Jacob


"Smitty2" wrote:

I HAVE 2 CELLS WITH DIFFERENT "IF" STATEMENTS
Cell Q73 reads
=IF(L73=300000,"3000",IF(L73=270000,"2700",IF(L7 3=240000,"2400",IF(L73=200000,"2000","0"))))
Cell Q74 reads
IF(L74=200000,"3000",IF(L74=170,000,"2700",IF(L7 4=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.


Jacob Skaria

IF statement
 
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,""))


--
Jacob


"Smitty2" wrote:

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?


"Jacob Skaria" wrote:

--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,""))

--
Jacob


"Smitty2" wrote:

I HAVE 2 CELLS WITH DIFFERENT "IF" STATEMENTS
Cell Q73 reads
=IF(L73=300000,"3000",IF(L73=270000,"2700",IF(L7 3=240000,"2400",IF(L73=200000,"2000","0"))))
Cell Q74 reads
IF(L74=200000,"3000",IF(L74=170,000,"2700",IF(L7 4=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.


David Biddulph[_2_]

IF statement
 
You were writing text strings, not numbers. Get rid of the double quotes if
you want numbers.
--
David Biddulph

"Smitty2" wrote in message
...
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?

"Ron@Buy" wrote:

Try this:
=IF(OR(F66=0,F662),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

"Smitty2" wrote:

I HAVE 2 CELLS WITH DIFFERENT "IF" STATEMENTS
Cell Q73 reads
=IF(L73=300000,"3000",IF(L73=270000,"2700",IF(L7 3=240000,"2400",IF(L73=200000,"2000","0"))))
Cell Q74 reads
IF(L74=200000,"3000",IF(L74=170,000,"2700",IF(L7 4=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.





All times are GMT +1. The time now is 07:32 PM.

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