#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 81
Default Math formula

Can anybody help with this
Products sell at a discount - bigger order = bigger discount
Number Cost
5 £1.50
10 £1.25
15 £1.20
20 £1.00

To buy 12 the breakdown would be:
1st 5 @ £1.50=£7.50
2nd 5 @ £1.25=£6.25
Last 2 @ £1.20= £2.40

What I want to be able to do is type in the number wanted in cell A1 & then
B1 would give me the answer £16.50

I hope this can be sorted with a formula

Thanks
Saintsman
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Math formula

=(MIN(5,A1)*1.5)+(MIN(5,MAX(0,A1-5))*1.25)+(MIN(5,MAX(0,A1-10))*1.2)+(MIN(5,MAX(0,A1-15))*1)

What would happen to more than 20?


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Saintsman" wrote in message
...
Can anybody help with this
Products sell at a discount - bigger order = bigger discount
Number Cost
5 £1.50
10 £1.25
15 £1.20
20 £1.00

To buy 12 the breakdown would be:
1st 5 @ £1.50=£7.50
2nd 5 @ £1.25=£6.25
Last 2 @ £1.20= £2.40

What I want to be able to do is type in the number wanted in cell A1 &
then
B1 would give me the answer £16.50

I hope this can be sorted with a formula

Thanks
Saintsman



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Math formula

If your numbers 5 to 20 run from A3 to A6, and the corresponding costs
(£1.50 to £1.00) from B3 to B6, then use
For D3 =MIN(A3,A$1)
For D4 =MIN(A4-A3,A$1-SUM(D$3:D3)) and copy down into D5 & D6.
For E3 =D3*B3 and copy down into D4 to D6
For B1 =SUM(E3:E6)
which gives £16.15, not your £16.50 (which I assume is a typo?).
--
David Biddulph

"Saintsman" wrote in message
...
Can anybody help with this
Products sell at a discount - bigger order = bigger discount
Number Cost
5 £1.50
10 £1.25
15 £1.20
20 £1.00

To buy 12 the breakdown would be:
1st 5 @ £1.50=£7.50
2nd 5 @ £1.25=£6.25
Last 2 @ £1.20= £2.40

What I want to be able to do is type in the number wanted in cell A1 &
then
B1 would give me the answer £16.50

I hope this can be sorted with a formula

Thanks
Saintsman



  #4   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Math formula

Using JE McGimpsey's approach from his site:
http://mcgimpsey.com/excel/variablerate.html

If D1 = 12 and your table is in A1:B4, try:

=(D1*B1)+SUMPRODUCT(--(D1A1:A3),(D1-A1:A3),(B2:B4-B1:B3))

which also gives me £16.15. BTW anything over 20 will be priced at £1.00


"Saintsman" wrote:

Can anybody help with this
Products sell at a discount - bigger order = bigger discount
Number Cost
5 £1.50
10 £1.25
15 £1.20
20 £1.00

To buy 12 the breakdown would be:
1st 5 @ £1.50=£7.50
2nd 5 @ £1.25=£6.25
Last 2 @ £1.20= £2.40

What I want to be able to do is type in the number wanted in cell A1 & then
B1 would give me the answer £16.50

I hope this can be sorted with a formula

Thanks
Saintsman

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default Math formula

Hi

One way
=A1*1+MIN(15,A1)*0.2+MIN(10,A1)*0.05+MIN(5,A1)*0.2 5

--
Regards

Roger Govier


"Saintsman" wrote in message
...
Can anybody help with this
Products sell at a discount - bigger order = bigger discount
Number Cost
5 £1.50
10 £1.25
15 £1.20
20 £1.00

To buy 12 the breakdown would be:
1st 5 @ £1.50=£7.50
2nd 5 @ £1.25=£6.25
Last 2 @ £1.20= £2.40

What I want to be able to do is type in the number wanted in cell A1 &
then
B1 would give me the answer £16.50

I hope this can be sorted with a formula

Thanks
Saintsman



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
Math Formula Mike Rogers Excel Discussion (Misc queries) 6 March 13th 07 02:41 AM
Excel math formula dan Excel Worksheet Functions 4 October 30th 06 04:51 PM
simple math formula Gabriel Excel Discussion (Misc queries) 3 August 25th 06 03:25 PM
In Excel, I need a date math formula... Lisa Excel Discussion (Misc queries) 2 December 3rd 04 12:13 AM
How do I do math on a cell name in formula? Mark Mulik Excel Worksheet Functions 3 November 23rd 04 03:43 PM


All times are GMT +1. The time now is 12:32 AM.

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

About Us

"It's about Microsoft Excel"