I am trying to make a spread sheet that converts gross profit % to dollar value and dollar value to gross profit % without affecting a formula.
this way I can mark things up with a percentage and know my price or see my gp% if I enter a random price for a product. I want it to work both ways and update live just like the grams to lbs converter but for two sets of columns, therefore I would need to sets of scripts with different target values for the seperate columns.
I was working with the VBP that converts lbs to grams and grams to lbs
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = "$H$4" Then Target.Offset(, 1).Value = Target * 2.20462262
If Target.Address = "$I$4" Then Target.Offset(, -1).Value = Target / 2.20462262
Application.EnableEvents = True
End Sub
I would need to enter the formulas after the target constant
(price - cost)/price = gross profit %
cost/(1-GP%) = dollar sale value
then I would need to expand the range of the equation to the bottom of the target column so it searches the entire page. When I did this is was working for some but I changed something that I can't figure out and now it is not working at all.
If anyone could offer some suggestions or solution to the problem I really could use it. I thought this would be simple but it is wearing me out trying to get this to work.
Bookmarks