# Need help creating an algebra-like formula

#### msdclark

##### New Member
I wasn't good at Algebra because I should get this if I were.

I have the following:
V = number of bottles of product
W = price paid by customer
X = cost of bottle
Z = Free bottle

Normal price of bottle is 14.50
Customer needs to pay 14.00 a bottle
I can provide free bottles to make up the difference, but I can't lower price.

What is the ratio of bottles that need to be purchased along with number of free bottles I need to provide him to get the final bottle cost as close to 14.00 as possible?
It can be any ratio of purchased bottles to ratio of free bottles, but I can't figure out how to create a formula that lets me plug each of these amounts in.

The next time I'm faced with this situation the bottles will cost a different amount and the customer will pay a different amount.

### Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Code:
``````      --------A-------- --B--- -------C------- D
1   List Price        \$14.50
2   Average Price     \$14.00
3   Free Bottle Every     28 B3: =B2/(B1-B2)``````

msdclark,

Perhaps this as a calculator....
Excel 2007
AB
1Total bottles of product wanted76
2Customer's required bottle price£ 14.00
3Normal bottle price£ 14.50
4Bottles to be charged as normal73
5Bottles to be supplied free3

</TBODY>
Sheet3

Worksheet Formulas
CellFormula
B4=B1-B5
B5=B1-INT(B1*B2/B3)

</TBODY>

<TBODY>
</TBODY>

Hope that helps.

Last edited:

Replies
1
Views
186
Replies
1
Views
479
Replies
3
Views
900
Replies
10
Views
350
Replies
1
Views
531

1,203,513
Messages
6,055,832
Members
444,828
Latest member
StaffordStag

### 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.

### Which adblocker are you using?

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

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