Loop then skip then loop

Sayf1

New Member
Joined
Jul 17, 2018
Messages
8
Hey all,

i have ave a simple loop that goes through all colons and rows. I want to to go through 2 rows (1&2) then skip to 11 then run for 4&5 then skip to 7&8 and so one until there is nothing in colomn A. Please help me

Thank you!
 

Some videos you may like

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
46,521
Office Version
  1. 365
Platform
  1. Windows
Maybe something like
Code:
Sub test()
Dim i As Long
For i = 1 To 25 Step 3
   Range("A" & i).Interior.Color = 45678
   Range("A" & i + 1).Interior.Color = 67890
Next i
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,109,310
Messages
5,527,939
Members
409,793
Latest member
mavrik_stet

This Week's Hot Topics

Top