ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   IF Statement troubles (https://www.excelbanter.com/excel-discussion-misc-queries/260341-if-statement-troubles.html)

tina

IF Statement troubles
 
I have a list box in F5 with 24, 18,14, 12,10. I need F7 to return if:
24=2400
18=1350
14=816
12=600
10=416

The first part of the below formula works, but I can't get it to work past
that. Could someone please help?

=IF(F5=(24),2400,If(or(f5=(18),1350)))

Thank you!

Bob Phillips[_4_]

IF Statement troubles
 
Try

=VLOOKUP(F5,{24,2400;18,1350;14,816;12,600;10,416} ,2,FALSE)

--

HTH

Bob

"Tina" wrote in message
...
I have a list box in F5 with 24, 18,14, 12,10. I need F7 to return if:
24=2400
18=1350
14=816
12=600
10=416

The first part of the below formula works, but I can't get it to work past
that. Could someone please help?

=IF(F5=(24),2400,If(or(f5=(18),1350)))

Thank you!




Joe User[_2_]

IF Statement troubles
 
"Tina" wrote:
I have a list box in F5 with 24, 18,14, 12,10.
I need F7 to return if:
24=2400
18=1350
14=816
12=600
10=416


If you are not concerned about errors, try:

=LOOKUP(F5,{10,12,14,18,24},{416,600,816,1350,2400 })


The first part of the below formula works,
but I can't get it to work past that.

[....]
=IF(F5=(24),2400,If(or(f5=(18),1350)))


FYI, the equivalent IF expression is:

=if(F5=10,416,if(F5=12,600,if(F5=14,816,
if(F5=18,1350,2400))))


----- original message -----

"Tina" wrote:
I have a list box in F5 with 24, 18,14, 12,10. I need F7 to return if:
24=2400
18=1350
14=816
12=600
10=416

The first part of the below formula works, but I can't get it to work past
that. Could someone please help?

=IF(F5=(24),2400,If(or(f5=(18),1350)))

Thank you!



All times are GMT +1. The time now is 06:43 PM.

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