Forum Discussion

ihatebills's avatar
ihatebills
Copper Contributor
Jun 24, 2019
Solved

My macro turns my relative references to absolute.

I made a macro record and made sure to use relative references, I made rows to identify how may to insert via select then insert rows.  But it just became the dullest macro coz it refers to my refere...
  • nabilmourad's avatar
    Jun 24, 2019

    ihatebills 

    The situation is not clear enough to me and there is no sample file.

    However, In general

    1- A relative macro runs RELATIVE to a Starting cell

    Beside highlighting "Use Relative Reference" on the Developer Tab, you have to note which cell was selected when you started the recording.

    When you run the Macro, it will repeat the recorded steps relative to the cell you select when running it.

    2- Because the macro recorder doesn't necessarily create an efficient code, then try to shorten the code by using shortcuts while recording, like instead of using a drop down menu command to insert Rows, you can use the shortcut CTRL + (Plus sign on the NUMERIC keypad)
    Hope that helps

    Nabil Mourad

     

Resources