View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JP JP is offline
external usenet poster
 
Posts: 103
Default Create a formula with conditions

Thank you so much for your response. I have a few questions and would like
to changes the ranges. M22 will hold the range values, and K24 will hold the
constant.

So how does this look
=IF(M22=200,K24*K27,IF(M22=100,K24*I27,IF(M22=5 0,K27*H27,IF(M22=25,K27*G27,IF(M22<25,K27*0)))))


New Ranges:
0-24.99 *0
25-49.99 *G27 (.1)
50-99.99 *H27 (.2)
100-199.99 *I27 (.4)
(Greater than) 200 *K27 (.5) Did I use the correctly?

"Myrna Larson" wrote:

You are writing <= when you mean = and vice versa. I hope that isn't spilling
over into your formulas...

=IF(A1=100,D8*.5,IF(A1=50,D8*.4,IF(A2=25,D8*.2, IF(A2=0,D8*.1))))

You say 100-200, but the above will multiply D8 by 0.5 if A2 is 200. Is that
possible?

There's some confusion in your verbal description re the boundary values. You
say 25-50, and then 50-100. I've assumed that 50 belongs in the 2nd category
rather than the 1st. If that's not the case, change all of the = to

Another possibility is

=D8*CHOOSE(A2/25+1,.1, .2, .4, .4, .5)

It's using these ranges, 0-24.99, 25-49.99, 50-74.99, 75-100, 100, where the
multiplier for the 3rd and 4th ranges is the same.

You could also put your bin boundaries and multipliers in table elsewhere on
the sheet and use VLOOKUP, but that may be overkill for just 4 categories.


On Sat, 27 Oct 2007 18:19:01 -0700, JP wrote:

How can I create a formula for the following:

if A2 is <= 25 then * D8 by B4, and if A2 is <=25 but =50 then *D8 by B5,
and if A2 is<=50 but =100 then * D8 by B6?

So essentially if A2 is 0-25 then multiply D8 (a constant) by .10
and if A2 is 25-50, then multiply D8 by .2
and if A2 is 50-100, then multiply D8 by .4
and if A2 is 100-200, then multiply D8 by .5

Thanks for any help.

JP