Hi,

I've recorded a macro to do a simply subtraction of two cells (Column E - Column F). I used the option for "relative references" when recording the macro, and this works correctly for the following rows.
The problem I have is that I need to execute this macro in a number of possible columns, however the macro seem to record the "distance" from the columns where it should perform the subtraction. As a result it won't work when it try and execute in a different column to the one where it originally recorded the macro.

How can I change the macro so that performs the subtraction for columns E and F, regardless of which column I execute the macro in?

Current macro code is as follows:

Sub Calculate_NET_price()
'
' Keyboard Shortcut: Ctrl+Shift+G
'
    ActiveCell.Select
    ActiveCell.FormulaR1C1 = "=RC[-9]-RC[-8]"
    ActiveCell.Offset(1, 0).Range("A1").Select
End Sub
Thank you for your help.
Steve.