Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Nested If-Then statement with number range.

This is what I want to do.

If cell K184 is less than 165, multiply cell K182 by .5
If cell K184 is 166-300, multiply cell K182 by .55
If cell K184 is greater than 300, multiply cell K182 by .6

This is the formula that has returned the most results so far...
=IF(K184<165, K182*0.5, IF(OR(K184165,K184<300), K182*0.55, IF(K184300,
K182*0.6)))

It works for the first and second IF statements. However, if cell K184 is
more than 300 it still multiplies it by .55. What am I missing?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Nested If-Then statement with number range.

Try this:

=IF(K184<=165,K182*.5,IF(K184<=300,K182*.55,K182*. 6))

You don't need to specify so many conditions, since the FALSE portion of an
IF Statement only evaluates if the condition is false. So, by the time it
gets to K182*.6, we've already established that K184 is greater than 300.

HTH
Elkar


"ladeewzl" wrote:

This is what I want to do.

If cell K184 is less than 165, multiply cell K182 by .5
If cell K184 is 166-300, multiply cell K182 by .55
If cell K184 is greater than 300, multiply cell K182 by .6

This is the formula that has returned the most results so far...
=IF(K184<165, K182*0.5, IF(OR(K184165,K184<300), K182*0.55, IF(K184300,
K182*0.6)))

It works for the first and second IF statements. However, if cell K184 is
more than 300 it still multiplies it by .55. What am I missing?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Nested If-Then statement with number range.

TYVM!!!

"Elkar" wrote:

Try this:

=IF(K184<=165,K182*.5,IF(K184<=300,K182*.55,K182*. 6))

You don't need to specify so many conditions, since the FALSE portion of an
IF Statement only evaluates if the condition is false. So, by the time it
gets to K182*.6, we've already established that K184 is greater than 300.

HTH
Elkar


"ladeewzl" wrote:

This is what I want to do.

If cell K184 is less than 165, multiply cell K182 by .5
If cell K184 is 166-300, multiply cell K182 by .55
If cell K184 is greater than 300, multiply cell K182 by .6

This is the formula that has returned the most results so far...
=IF(K184<165, K182*0.5, IF(OR(K184165,K184<300), K182*0.55, IF(K184300,
K182*0.6)))

It works for the first and second IF statements. However, if cell K184 is
more than 300 it still multiplies it by .55. What am I missing?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Nested If-Then statement with number range.

Your problem is that K184300 satisfies the condition K184165, and
therefore satisfied the OR condition, so gives the 0.55 result. You
probably intended AND rather than OR, but see below.

In your text description you haven't defined a result for K184 between 165
and 166, but you could start with something like
=K182*IF(K184<165,0.5,IF(K184<=300,0.55,0.6))
You may want to vary the < and <= conditions.
Remember that if you've tested for <300 you don't afterwards need to test
for = 300, and similarly with the 165 condition.

In your formula, if you change OR to AND, you haven't given a result for
K184=165 or K184=300, so as you haven't given an alternative result for the
last IF your result would be the Boolean FALSE.
--
David Biddulph

"ladeewzl" wrote in message
...
This is what I want to do.

If cell K184 is less than 165, multiply cell K182 by .5
If cell K184 is 166-300, multiply cell K182 by .55
If cell K184 is greater than 300, multiply cell K182 by .6

This is the formula that has returned the most results so far...
=IF(K184<165, K182*0.5, IF(OR(K184165,K184<300), K182*0.55, IF(K184300,
K182*0.6)))

It works for the first and second IF statements. However, if cell K184 is
more than 300 it still multiplies it by .55. What am I missing?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Nested If-Then statement with number range.

Hi,

Try this

=vlookup(K184,A2:C4,3)*K182. In A2:A4, you have 0,166 and 300. In B2:B4,
you have 165,300 and blank. In C2:C4, you have 0.5, 0.55 and 0.6

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"ladeewzl" wrote in message
...
This is what I want to do.

If cell K184 is less than 165, multiply cell K182 by .5
If cell K184 is 166-300, multiply cell K182 by .55
If cell K184 is greater than 300, multiply cell K182 by .6

This is the formula that has returned the most results so far...
=IF(K184<165, K182*0.5, IF(OR(K184165,K184<300), K182*0.55, IF(K184300,
K182*0.6)))

It works for the first and second IF statements. However, if cell K184 is
more than 300 it still multiplies it by .55. What am I missing?




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
Nested If statement to control format of number-type cells TB Excel Worksheet Functions 3 May 16th 08 01:35 AM
Nested if statement ? Angelaf Excel Worksheet Functions 3 April 14th 08 02:28 PM
Nested if statement burl_h Excel Worksheet Functions 3 December 16th 06 06:35 PM
IF statement (non nested) that compares cell value against range r2d3 Excel Worksheet Functions 4 August 10th 06 01:11 PM
Nested IF statement with cell range reference Joe Spicer Excel Worksheet Functions 5 December 15th 05 07:21 PM


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