• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Would the CHOOSE function be appropriate here? And how?

Hayley

Member
I'm not quite sure I understand how to use the CHOOSE function.


I have 7 ranges, and each range earns a specific discount.


A sample of this is:

If the product costs less than $2000, discount is $0

If the product costs $2000 - $2999, discount is $50

If the product costs $3000 - $3999, discount is $75

If the product costs $10,000 or more, discount is $250


I think I can do a nested IF function, but was just reading about the CHOOSE function. Would that work in this case? And if so, can someone help me write it?


Thanks so much.
 
CHOOSE is more useful if the input it a incremental value starting at one, e.g

1,2,3,4,...

which then determine which output to give. For this type of problem, your best best is to build a lookup table like this somewhere (say, A1:B5)

[pre]
Code:
Cost	      Discount
$0 	        $0
$2,000 	        $50
$3,000 	        $75
$10,000 	$250
[/pre]
Then you can do a lookup formula like:

=LOOKUP(ActualCost,A2:B5)

to get the correct discount.


Feel free to do a quick google search (top-right corner) for price listings to see other examples similar to yours.
 
Thank you Luke, creating that easy chart and doing the LOOKUP did exactly what I needed.


I appreciate your help!
 
If you want to use CHOOSE then you'll need a function that will evaluate to a number and then use the index.


Code:
=CHOOSE(MATCH(A1,{0,2000,3000,4000,10000},1),0,50,75,NA(),250)


The part "MATCH(A1,{0,2000,3000,4000,10000},1)" evaluates to number. You can also setup a table as Luke M has suggested as it lends you to change the criteria flexibly without touching the formula(s).
 
vicious incident of food and drug exposure a large extent,michael kors handbags, who do not know the number of venues in the city? house prices rise year on year, The imitate come.
Related articles:


Henceforth will I recognize that each day I am tested by life in like manner. If I persist, if I continue to try, if I continue to charge forward,air jordans, I will succeed.Related articles:


http://www.treebankwiki.org/index.php5/User:05018822819
[*]http://www.jujusports.com.cn/bbs/viewthread.php?tid=111508&pid=136330&page=1&extra=page%3D1#pid136330
[*]http://www.bqpd.cn/showtopic.aspx?forumpage=1&topicid=180238&page=end&jump=pid#8702781


Henceforth will I recognize that each day I am tested by life in like manner. If I persist, if I continue to try, if I continue to charge forward, I will succeed.Related articles:


Henceforth will I recognize that each day I am tested by life in like manner. If I persist, if I continue to try, if I continue to charge forward, I will succeed.
 
Back
Top