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

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
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
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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).
 
Upvote 0

Forum statistics

Threads
1,213,484
Messages
6,113,923
Members
448,533
Latest member
thietbibeboiwasaco

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
Back
Top