A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

multiply value based on quantity



 
 
Thread Tools Display Modes
  #1  
Old April 21st, 2010, 06:42 AM posted to microsoft.public.excel.worksheet.functions
Bigfoot3910
external usenet poster
 
Posts: 1
Default multiply value based on quantity

I am trying to calculate a discount price based on quantity purchased. For
example if someone buys 20 widgets they pay $4.00 each for them, if they buy
50 widgets they pay $4.00 each for the first 20, then $3.50 each for the next
30, 100 widgets - $4.00 first 20, $3.50 next 30 and $3.25 for the other
50..............

Any hope?
  #2  
Old April 21st, 2010, 07:09 AM posted to microsoft.public.excel.worksheet.functions
Per Jessen
external usenet poster
 
Posts: 686
Default multiply value based on quantity

Here's a way with quantity in A2:

=MIN(A2,20)*4+MAX(MIN(A2-20,30),0)*3.5+MAX(MIN(A2-50,50),0)*3.25

Regards,
Per

"Bigfoot3910" skrev i meddelelsen
...
I am trying to calculate a discount price based on quantity purchased. For
example if someone buys 20 widgets they pay $4.00 each for them, if they
buy
50 widgets they pay $4.00 each for the first 20, then $3.50 each for the
next
30, 100 widgets - $4.00 first 20, $3.50 next 30 and $3.25 for the other
50..............

Any hope?


  #3  
Old April 21st, 2010, 11:42 AM posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_]
external usenet poster
 
Posts: 1,764
Default multiply value based on quantity

Hi,

You may get some pointers from B) 1) from this link -
http://ashishmathur.com/articles.aspx

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Bigfoot3910" wrote in message
...
I am trying to calculate a discount price based on quantity purchased. For
example if someone buys 20 widgets they pay $4.00 each for them, if they
buy
50 widgets they pay $4.00 each for the first 20, then $3.50 each for the
next
30, 100 widgets - $4.00 first 20, $3.50 next 30 and $3.25 for the other
50..............

Any hope?


  #4  
Old April 21st, 2010, 12:00 PM posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
external usenet poster
 
Posts: 3,719
Default multiply value based on quantity

On Tue, 20 Apr 2010 22:42:01 -0700, Bigfoot3910
wrote:

I am trying to calculate a discount price based on quantity purchased. For
example if someone buys 20 widgets they pay $4.00 each for them, if they buy
50 widgets they pay $4.00 each for the first 20, then $3.50 each for the next
30, 100 widgets - $4.00 first 20, $3.50 next 30 and $3.25 for the other
50..............

Any hope?


To set up a method of doing this that is easily maintainable, and extensible,
you could use a lookup table.

Somewhere on your worksheet set up a table. I NAME'd it "Tbl" (without quotes)

With your data, your table would look like:

0 $ 0.00 $4.00
20 $ 80.00 $3.50
50 $185.00 $3.25
....

Note that column 2 is the total cost of what came before. So if your table is
in I1:K3, then J2: =(I2-I1)*K1+J1 and you fill down as far as needed.

Then, with your quantity in A1, the total cost is given by:

=VLOOKUP(A1,Tbl,2)+(A1-VLOOKUP(A1,Tbl,1))*VLOOKUP(A1,Tbl,3)
--ron
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:24 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.