#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kim
 
Posts: n/a
Default formula

I am trying to create an IF formula that if a column is <16 but 49 then
multiple by .75 or if the number is <8 but 15 ten multiple by .50, if
greater than 50 100%, if less than 8 = 0.

Here is the formula that I have created
=IF(Q550,E5,IF(Q516<49,E5*0.75,IF(Q58<15,E5*0.5 ,IF(Q5<8,0))))

It is working for all instances except numbers that are betwen 16 and 49.
Can someone help?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jnu
 
Posts: n/a
Default formula

you have over lapping values. if <8 but 15 overlaps with less than 8. can
you clarify or did you not notice

"Kim" wrote:

I am trying to create an IF formula that if a column is <16 but 49 then
multiple by .75 or if the number is <8 but 15 ten multiple by .50, if
greater than 50 100%, if less than 8 = 0.

Here is the formula that I have created
=IF(Q550,E5,IF(Q516<49,E5*0.75,IF(Q58<15,E5*0.5 ,IF(Q5<8,0))))

It is working for all instances except numbers that are betwen 16 and 49.
Can someone help?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kim
 
Posts: n/a
Default formula

I tried changing to to 7 or less but I got the same result "False".

"jnu" wrote:

you have over lapping values. if <8 but 15 overlaps with less than 8. can
you clarify or did you not notice

"Kim" wrote:

I am trying to create an IF formula that if a column is <16 but 49 then
multiple by .75 or if the number is <8 but 15 ten multiple by .50, if
greater than 50 100%, if less than 8 = 0.

Here is the formula that I have created
=IF(Q550,E5,IF(Q516<49,E5*0.75,IF(Q58<15,E5*0.5 ,IF(Q5<8,0))))

It is working for all instances except numbers that are betwen 16 and 49.
Can someone help?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kim
 
Posts: n/a
Default formula

I'm still getting a "false" for the range from 8 to 15. It's not an error,
it's just putting in a false.

"Sandy Mann" wrote:

Kim" wrote in message
...

=IF(Q550,E5,IF(Q516<49,E5*0.75,IF(Q58<15,E5*0.5 ,IF(Q5<8,0))))


Q516<49 is the wrong syntax for an if function try:

=IF(Q550,E5,IF(and(Q516,Q5<49),E5*0.75,IF(and(Q5 8,Q5<15),E5*0.5,IF(Q5<8,0))))--HTHSandyIn Perth, the ancient capital of with @tiscali.co.uk"Kim" wrote in ...I tried changing to to 7 or less but I got the same result "False". "jnu" wrote: you have over lapping values. if <8 but 15 overlaps with less than 8.can you clarify or did you not notice "Kim" wrote: I am trying to create an IF formula that if a column is <16 but 49then multiple by .75 or if the number is <8 but 15 ten multiple by .50, if greater than 50 100%, if less than 8 = 0. Here is the formula that I have created =IF(Q550,E5,IF(Q516<49,E5*0.75,IF(Q58<15,E5*0.5 ,IF(Q5<8,0)))) It is working for all instances except numbers that are betwen 16 and49. Can someone help?




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sandy Mann
 
Posts: n/a
Default formula

Sorry I did not work though you original formula. If Q5 has 8 or 15 then it
will be missed because we are testing for 8 and < 8 but not =8 and likewise
we are testing for <15 and 16 but not =15. Try:

=IF(Q550,E5,IF(Q516<49,E5*0.75,IF(Q5=8<=15,E5*0 .5,IF(Q5<8,0))))

You may wish to move the "=" part to another part of the formula depending
on your requirements.
--
HTH

Sandy
In Perth, the ancient capital of Scotland


with @tiscali.co.uk


"Kim" wrote in message
...
I'm still getting a "false" for the range from 8 to 15. It's not an
error,
it's just putting in a false.

"Sandy Mann" wrote:

Kim" wrote in message
...

=IF(Q550,E5,IF(Q516<49,E5*0.75,IF(Q58<15,E5*0.5 ,IF(Q5<8,0))))


Q516<49 is the wrong syntax for an if function try:


=IF(Q550,E5,IF(and(Q516,Q5<49),E5*0.75,IF(and(Q5 8,Q5<15),E5*0.5,IF(Q5<8,0))))--HTHSandyIn
Perth, the ancient capital of
with
@tiscali.co.uk"Kim" wrote in
...I tried
changing to to 7 or less but I got the same result "False". "jnu"
wrote: you have over lapping values. if <8 but 15 overlaps with less
than 8.can you clarify or did you not notice "Kim" wrote: I
am trying to create an IF formula that if a column is <16 but 49then
multiple by .75 or if the number is <8 but 15 ten multiple by .50, if
greater than 50 100%, if less than 8 = 0. Here is the formula

that I have created
=IF(Q550,E5,IF(Q516<49,E5*0.75,IF(Q58<15,E5*0.5 ,IF(Q5<8,0))))
It is working for all instances except numbers that are betwen 16
and49. Can someone help?




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jnu
 
Posts: n/a
Default formula

try this =IF(Q5<8,0,IF(Q5<16,E5*0.5,IF(Q5<50,E5*0.75,E5)))



"Kim" wrote:

I am trying to create an IF formula that if a column is <16 but 49 then
multiple by .75 or if the number is <8 but 15 ten multiple by .50, if
greater than 50 100%, if less than 8 = 0.

Here is the formula that I have created
=IF(Q550,E5,IF(Q516<49,E5*0.75,IF(Q58<15,E5*0.5 ,IF(Q5<8,0))))

It is working for all instances except numbers that are betwen 16 and 49.
Can someone help?

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kim
 
Posts: n/a
Default formula

Thanks, that worked. I guess I was trying to make it too difficult.

"jnu" wrote:

try this =IF(Q5<8,0,IF(Q5<16,E5*0.5,IF(Q5<50,E5*0.75,E5)))



"Kim" wrote:

I am trying to create an IF formula that if a column is <16 but 49 then
multiple by .75 or if the number is <8 but 15 ten multiple by .50, if
greater than 50 100%, if less than 8 = 0.

Here is the formula that I have created
=IF(Q550,E5,IF(Q516<49,E5*0.75,IF(Q58<15,E5*0.5 ,IF(Q5<8,0))))

It is working for all instances except numbers that are betwen 16 and 49.
Can someone help?

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
KL
 
Posts: n/a
Default formula

Hi,

I guess it would be more efficient to do one of these:

=LOOKUP(Q5,{0;8;16;50},{0;0.5;0.75;1})*E5
=VLOOKUP(Q5,{0,0;8,0.5;16,0.75;50,1},2)*E5
=INDEX({0;0.5;0.75;1},MATCH(Q5,{0;8;16;50}))*E5
=CHOOSE(MATCH(Q5,{0;8;16;50}),0,0.5,0.75,1)*E5

The fixed arrays can of course be replaced by range references.

Regards,
KL


"Kim" wrote in message ...
Thanks, that worked. I guess I was trying to make it too difficult.

"jnu" wrote:

try this =IF(Q5<8,0,IF(Q5<16,E5*0.5,IF(Q5<50,E5*0.75,E5)))



"Kim" wrote:

I am trying to create an IF formula that if a column is <16 but 49 then
multiple by .75 or if the number is <8 but 15 ten multiple by .50, if
greater than 50 100%, if less than 8 = 0.

Here is the formula that I have created
=IF(Q550,E5,IF(Q516<49,E5*0.75,IF(Q58<15,E5*0.5 ,IF(Q5<8,0))))

It is working for all instances except numbers that are betwen 16 and 49.
Can someone help?



  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sloth
 
Posts: n/a
Default formula

I think you have your less than (<) and greater than () symbols mixed up (in
your comments anyways). So this is what I assume you meant...

If x is less then 8, then 0
If x is greater than 8, and less than 15, then 0.5*x
If x is greater than 16, and less than 49, then 0.75*x
if x is greater than 50, x

Your formula has a couple of errors.
First, "Q516<49" and "Q58<15" have no logical meaning in excel. I
believe both will return FALSE no matter what the value of Q5 actually is.
You can replace "Q516<49" with something like "AND(Q516,Q5<49)". So you
"could" use the following formula...
=IF(Q550,E5,IF(AND(Q516,Q5<49),E5*0.75,IF(AND(Q5 8,Q5<15),E5*0.5,IF(Q5<8,0))))
but this really isn't very efficient, and still has another problem.

Second, you might get wrong results because the formula produces 0 if Q5
equals 49, 50, 15, 16, and 8. For ranges you typically want to use in one
part of the formula and <= in the next, like this.
=IF(Q550,E5,IF(AND(Q516,Q5<=50),E5*0.75,IF(AND(Q 58,Q5<=16),E5*0.5,IF(Q5<=8,0))))
but in your example the ranges all meet. So you really don't need the AND
functions at all. So the formula could be.
=IF(Q550,E5,IF(Q516,E5*0.75,IF(Q58,E5*0.5,0)))
notice the second statement does NOT include "Q5<=50". This is because at
this point in the formula Q5 must be less than or equal to 50, or else it
would trigger the first test of "Q550". Notice also the last statement has
been omitted if Q5 is not greater than 8, then it must be less than or equal
to 8.

You can make it slightly smaller still by extracting the E5 in front of
the IF statement.
=E5*IF(Q550,1,IF(Q516,0.75,IF(Q5=8,0.5,0)))

This formula is pretty good and efficient, but many people (like myself)
don't like nested IF's and avoid them like the plague. Logical values (TRUE
and FALSE) are converted to 1's and 0's when you try to apply a mathatical
operator to them. So, you can use the following formula (though it might be
confusing to newer users).

=E5*((Q58)/2+(Q516)/4+(Q550)/4)
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
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
2 Nesting questions Starchaser Excel Worksheet Functions 7 January 20th 06 06:53 PM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM


All times are GMT +1. The time now is 11:21 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"