Offset command question

motionbuddy

New Member
Joined
Feb 23, 2016
Messages
1
Hello,

I just cannot seem to get the offset command working for me. Any assistance would be appreciated

I am trying to get H5=A1 and H6=A2 but then skip 8 lines for the H column so H13=A3 and H14=A4 then skip another 8 rows and repeat. Would the offset command work in this situation? How can I fill the formula in the H column if I have items in the skipped 8 rows that I do not want to modify?

Best
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
How can I fill the formula in the H column if I have items in the skipped 8 rows that I do not want to modify?

Welcome to the Forum!

I assume you're looking for a VBA solution, as it sounds like you can't simply copy a formula down column H.

Perhaps something like:

Code:
Sub InsertFormulae()

    Dim lNoRows As Long, i As Long
        
    lNoRows = Range("A" & Rows.Count).End(xlUp).Row
    For i = 1 To lNoRows Step 2
        Range("H" & 4 * (i - 1) + 5).Resize(2).Formula = "=A" & i
    Next i

End Sub
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

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