ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   gross profit margin formula (https://www.excelbanter.com/excel-discussion-misc-queries/17111-gross-profit-margin-formula.html)

julmcgrath

gross profit margin formula
 
I'm trying to figure out the formula for a gross profit margin percentage as
follows:

In Col A2, I will have a cost (i.e. $15.00)
In Col B2, I would like the result to be the total markup of $15.00 based on
a 40% gross profit margin, and then I need the resulting number to be rounded
up or down to the nearest $0.05, ending in a "5."

The resulting number should be $24.95, but I can't get it to come out that
way.
Any suggestions would be appreciated!

dlw

Getting the 40% markup is easy, right? The rounding is the tricky pary. Use
this formula:

=A1+0.05-((A1*10) - INT(A1*10))/10

A1 is the cell with the number you want to round.

David Biddulph

"dlw" wrote in message
...
Getting the 40% markup is easy, right? The rounding is the tricky pary.

Use
this formula:

=A1+0.05-((A1*10) - INT(A1*10))/10

A1 is the cell with the number you want to round.


But that rounds to 25.05 when the OP was looking for 24.95.

Continuing on dlw's theme, I think you might get the right answer with
=-(-A1+0.05-((-A1*10) - INT(-A1*10))/10)
but I would hope that there might be a more elegant way.
--
David Biddulph




All times are GMT +1. The time now is 10:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com