Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How do I set up a multiple condition formula?

I have 12 different conditions where I need to assign a number:
If E6 < 36.9, then the number is 0
If E6 =37 and <=37.49 then number is 0.25
If E6 =37.5 and <=37.99 then number is 0.50
E6 =38 and <= 38.49 then number is .75

and so on....

A friend told me that Excel will not let you use more than 7 conditions. Is
this true?

If someone could send me the formula to set up these conditions I would be
greatly appreciative as I have worn out the help tool!

Thanks!

Joe
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default How do I set up a multiple condition formula?

Hi,

First, if you are using Excel 2003 or earlier you are limited to 7 level
nested ifs. In 2007 that would be 64 levels.
Second, you can beat these limitations by concatenating the ifs in some
cases for example
=IF(E6 < 36.9,0,"")&IF(AND(E6=37,E6<=37.49),0.25,"")&....
However, a VLOOKUP function is probably a better choice, set up a lookup
table such as:
F G
0 0
37 0.25
37.5 0.5
38 0.75

Then use the formula
=VLOOKUP(E6,F$1:G$12,2)

If you can have negative number in E6 just change the 0 in F1 to a large
negative number.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"JoeAPM" wrote:

I have 12 different conditions where I need to assign a number:
If E6 < 36.9, then the number is 0
If E6 =37 and <=37.49 then number is 0.25
If E6 =37.5 and <=37.99 then number is 0.50
E6 =38 and <= 38.49 then number is .75

and so on....

A friend told me that Excel will not let you use more than 7 conditions. Is
this true?

If someone could send me the formula to set up these conditions I would be
greatly appreciative as I have worn out the help tool!

Thanks!

Joe

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default How do I set up a multiple condition formula?

You can set up a datalist in an out-of-the-way location, and make it as
large as you wish, and then use Lookup().

Expanding your example to match your scenario of 12 conditions, try this:

In Y1 to Z13, enter this:

Y Z
0 0
37 0.25
37.5 0.5
38 0.75
38.5 1
39 1.25
39.5 1.5
40 1.75
40.5 2
41 2.25
41.5 2.5
42 2.75
42.5 3

Now, you can use this formula:

=LOOKUP(E6,Y1:Z13)

Negative numbers in E6 will return an error.
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"JoeAPM" wrote in message
...
I have 12 different conditions where I need to assign a number:
If E6 < 36.9, then the number is 0
If E6 =37 and <=37.49 then number is 0.25
If E6 =37.5 and <=37.99 then number is 0.50
E6 =38 and <= 38.49 then number is .75

and so on....

A friend told me that Excel will not let you use more than 7 conditions. Is
this true?

If someone could send me the formula to set up these conditions I would be
greatly appreciative as I have worn out the help tool!

Thanks!

Joe


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default How do I set up a multiple condition formula?

=IF(E6<37,0,INT((E6-36.5)/0.5)*0.25)

Note that you haven't specied the outcome for values between 36.9 and 37, or
between 37.49 and 37.5, and so on, but I have assumed that where you say
<=37.49 you really meant <37.5, and so on.
--
David Biddulph

JoeAPM wrote:
I have 12 different conditions where I need to assign a number:
If E6 < 36.9, then the number is 0
If E6 =37 and <=37.49 then number is 0.25
If E6 =37.5 and <=37.99 then number is 0.50
E6 =38 and <= 38.49 then number is .75

and so on....

A friend told me that Excel will not let you use more than 7
conditions. Is this true?

If someone could send me the formula to set up these conditions I
would be greatly appreciative as I have worn out the help tool!

Thanks!

Joe




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple if condition formula required Narnimar Excel Discussion (Misc queries) 4 November 20th 08 12:34 PM
Multiple Scenario Condition Formula ssmbob Excel Worksheet Functions 2 January 30th 08 06:30 PM
What formula/fn would I use to count multiple condition records? Joshcat99 Excel Worksheet Functions 3 October 27th 05 01:45 AM
Multiple Condition Formula prolixity Excel Worksheet Functions 5 April 13th 05 01:24 AM
Multiple Condition Sumif Formula momtoaj Excel Worksheet Functions 3 April 6th 05 04:06 PM


All times are GMT +1. The time now is 05:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"