Excel Macros

Discussion in 'Mac Basics and Help' started by stecher, Feb 22, 2013.

  1. stecher macrumors newbie

    Feb 22, 2013
    I don't know how to tell the macro recorder to use relative cell position rather than fixed. Anybody know where I should look?

  2. blevins321 macrumors 68030

    Dec 24, 2010
    Winnipeg, MB
    I don't know if there's an automated way to do that besides recording a formula being entered to convert to the row/column relative format. But you can manually code it.

    Range("A1").Value ="Something"

    Can turn into Cells(row#,col#) = "Something". You can do math inside there so if you want three rows over and one cell down you could do Cells(row() + 3, col# - 1) = "Something".

    Hope that helps!
  3. James Craner macrumors 68000

    James Craner

    Sep 13, 2002
    Bristol, UK
    Mike, There is a relative reference button in the Developer Ribbon - See screenshot.

    When this button is turned on, any Macro's created using the record button will use relative cell references.


Share This Page