Stumped

dhaderle

New Member
Joined
Aug 21, 2002
Messages
37
Math problem for you all that I'm trying to solve without a bunch of IF statements or lookups.

I have an input cell for widgets. I price 400 widgets at $32.00 each. For every additional widget the price will be one penny less. So, 401 widgets entered in will yield a price of $31.99, 402 widgets equal $31.98, etc, etc....
At 500 widgets, the price decrease changes to two pennies less for every incremental widget. At 600 widgets the price then is fixed at $29.00 At 400 or less the price is $32.00/each.

Is there a formula/function able to solve this?

Thanks!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

acw

MrExcel MVP
Joined
Feb 13, 2004
Messages
4,814
Hi

Assuming that your widgets go into A2 try

Code:
=IF(A2>=600,A2*29,IF(A2>=501,12800+(A2-400)*(3200-(A2-400)*2)/100,IF(A2>=401,12800+(A2-400)*(3200-(A2-400))/100,A2*32)))


Tony
 

dhaderle

New Member
Joined
Aug 21, 2002
Messages
37
The math is not right. If I put 401 widgets into A2 the new price is not 31.99, instead it is 31.999975 which rounds to 32.00.
 

acw

MrExcel MVP
Joined
Feb 13, 2004
Messages
4,814
Hi

Can you give some examples of numbers of widgets, and expected results. To me 400 widgets should give a total of 12800, and 401 should give 12831.99. Or should 401 widgets have a total of 12827.99???


Tony
 

Datsmart

Well-known Member
Joined
Jun 19, 2003
Messages
7,985

ADVERTISEMENT

dhaderle

I put Tony's formula in B2, which gives me 12827.99
Then put =ROUNDDOWN(B2/A2, 2) in C2.
That gives you your 31.99

Datsmart
 

Tazguy37

MrExcel MVP
Joined
May 28, 2004
Messages
4,237
You might also try:

=IF(A1<=400,32*A1,IF(A1<=499,A1*(32-(A1-400)/100),IF(A1<=599,A1*(32-2*(A1-500)/100),29*A1)))

with the number of widgets in cell A1. (Sounds like homework I once had).
 

Ronald Moore

Board Regular
Joined
Aug 22, 2005
Messages
101

ADVERTISEMENT

Try this:

=MAX(29,41-MAX(A2/100,4)-MAX(A2/100,5))
 

Watch MrExcel Video

Forum statistics

Threads
1,129,810
Messages
5,638,483
Members
417,027
Latest member
wlknspc7

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top