Well, there is kind of a way to do it with just the three columns (Sale Price, Markup and Cost).
A formula will give you the circular reference, but you can use VBA code to get around that.
if you were to write a macro on the worksheet, under the Change event you can do it. For example, the data you are trying to manipulate is on a sheet called Margin which is the first sheet in the workbook.
If you open the VBA editor (F11) then double click on Microsoft Excel Objects, Sheet1(Margin) and change the lefthand dropdown from General to Worksheet, then change the righthand dropdown to Change you will get the lines below in Blue. Put the lines in Red between the others, and anytime you make a change on that worksheet, this macro runs. (note, there are three lines that will turn green in VBA, they are the comments)
Private Sub Worksheet_Change(ByVal Target As Range)
Dim intSalePriceColumn As Integer
Dim intMarkupColumn As Integer
Dim intCostColumn As Integer
' determining which columns have the data
For x = 1 To 256
If Cells(1, x) = "Sale Price" Then intSalePriceColumn = x
If Cells(1, x) = "Markup" Then intMarkupColumn = x
If Cells(1, x) = "Cost" Then intCostColumn = x
Next x
' if you have just changed the sale price, calculate the markup
If ActiveCell.Column = intSalePriceColumn Then
Cells(ActiveCell.Row - 1, intMarkupColumn) = FormatPercent(Cells(ActiveCell.Row - 1, intSalePriceColumn) / Cells(ActiveCell.Row - 1, intCostColumn), 1, vbTrue, vbTrue)
End If
' if you have just changed the markup, calculate the sale price
If ActiveCell.Column = intMarkupColumn Then
Cells(ActiveCell.Row - 1, intSalePriceColumn) = FormatCurrency(Cells(ActiveCell.Row - 1, intMarkupColumn) * Cells(ActiveCell.Row - 1, intCostColumn))
End If
End Sub