ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   How to: Multiple "if" statements? (https://www.excelbanter.com/new-users-excel/32992-how-multiple-%22if%22-statements.html)

Hosh

How to: Multiple "if" statements?
 
NEWBIE ALERT*:
OK, please bare with me.

What is the method for combining multiple if statements in one cell's
formula?

In English, the formula would be something like:

"If cell B3 is less than 1000 then display the price that is in cell F2, if
cell B3 is more than 1000 but less than 2000 then display the price that is
in cell F3..etc, etc..."

Besides HOW to write that formula, I have a question: How many conditions
can be combined in one formula? I have about 20 different "less than or
greater than" items.

Is this the best way to accomplish this? (I suspect NOT)

Thanks for reading!



JE McGimpsey

Based on your English description:

=IF(B3<1000,F2,IF(B3<2000,F3,IF(B3<3000,F4,"more than 3000)))

Note that you can only nest 7 functions deep.

However, if the pattern holds, you could make this a bit simpler:

=INDEX(F:F,2+INT(B3/1000))



In article , "Hosh"
wrote:

NEWBIE ALERT*:
OK, please bare with me.

What is the method for combining multiple if statements in one cell's
formula?

In English, the formula would be something like:

"If cell B3 is less than 1000 then display the price that is in cell F2, if
cell B3 is more than 1000 but less than 2000 then display the price that is
in cell F3..etc, etc..."

Besides HOW to write that formula, I have a question: How many conditions
can be combined in one formula? I have about 20 different "less than or
greater than" items.

Is this the best way to accomplish this? (I suspect NOT)

Thanks for reading!


Don Guillett

Best to make a lookup table and use the VLOOKUP function. Look in HELP
index.

--
Don Guillett
SalesAid Software

"Hosh" wrote in message
...
NEWBIE ALERT*:
OK, please bare with me.

What is the method for combining multiple if statements in one cell's
formula?

In English, the formula would be something like:

"If cell B3 is less than 1000 then display the price that is in cell F2,

if
cell B3 is more than 1000 but less than 2000 then display the price that

is
in cell F3..etc, etc..."

Besides HOW to write that formula, I have a question: How many conditions
can be combined in one formula? I have about 20 different "less than or
greater than" items.

Is this the best way to accomplish this? (I suspect NOT)

Thanks for reading!






All times are GMT +1. The time now is 10:26 PM.

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