Forum Discussion

kheldar's avatar
kheldar
Iron Contributor
Mar 01, 2022

Increase Cell References by X in Formulas Macro

Hello,

 

I have been searching the net for a possible solution but I couldn't find what I need wherever I looked.

 

I need to increment all cell references in formulas by X or 1 in a selected or defined range in a specific sheet or active sheet.


A note:

 

The structure of all cells and formulas doesn't allow autofill.

 

Could anyone help me with that?

 

I've tried this but it doesn't do anything.

Sub Increment()
Range("A2:A400").Select
Selection.Offset(1, 0).Select
End Sub

I'd really appreciate your help.

6 Replies

  • kheldar 

    =INDIRECT("A"&ROW($A$3)+(ROW(A1)-1)*$F$1)

    Maybe like this? In cell F1 you can enter the X or 1 by which you want the cell reference to increment.

    • kheldar's avatar
      kheldar
      Iron Contributor
      Hmm would that work with different formulas? Because many of the cells have different formulas.
      • OliverScheurich's avatar
        OliverScheurich
        Gold Contributor

        kheldar 

        Can you share the other formulas? In principle, this should also be possible with other formulas.

Resources