Insert formula every nth Row?

Retail_Therapy

New Member
Joined
Nov 22, 2017
Messages
10
From Columns AN to BB (15 columns in total), I have a match/index formula that needs to be inserted every 11th row.
Does anyone know of a VBA code to perform this?

Note: each of the 15 column is a unique match/index formula catered to that specific column cell.

Thank you in advance,
Kim
 
If you know the number of rows you want to copy it down for, it is much simpler, i.e.
Code:
Sub MyInsert()

    Dim r As Long
    
    Application.ScreenUpdating = False
    
'   Loop until column AN is blank
    For r = 5 To 2942 Step 11
'       Insert blank row
        Rows(r).Insert
'       Insert formulas
        Cells(r, "AN").Formula = "=ROW()"
        Cells(r, "BB").Formula = "=COLUMN()"
    Loop
    
    Application.ScreenUpdating = True
    
End Sub
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,215,391
Messages
6,124,674
Members
449,179
Latest member
fcarfagna

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top