Loop, skip every 3rd row

288enzo

Well-known Member
Joined
Feb 8, 2009
Messages
723
Office Version
  1. 2016
Platform
  1. Windows
I know how to use * to skip rows, but I can't figure out how to do it after every 2 rows.
This is my code
VBA Code:
    Dim rng As Range
    Dim i As Long
    Dim var As Variant
    var = Array("82a", "82b", "83a", "83b", "84a", "84b")
    Set rng = Range("C7")
    For i = 0 To UBound(var)
        rng.Offset(i, 0) = var(i)
    Next i

This is the outcome
2021_CertReadinessReport_ASE_AudiSouthern_11062021.xls
BC
682 Total:
782a
882b
983 Total:83a
1083b
1184a
1284 Total:84b
13
14
Dealer Status


This is what I'm trying to achieve
2021_CertReadinessReport_ASE_AudiSouthern_11062021.xls
BC
682 Total:
782a
882b
983 Total:
1083a
1183b
1284 Total:
1384a
1484b
Dealer Status


Thank you for the help and the education.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,215,482
Messages
6,125,058
Members
449,206
Latest member
Healthydogs

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