Hi all.
I want some help, to modify this VBA code. I want to copy additional columns Z and AA, the even numbered rows, starting with Z8.
Thank you in advance.
Sub test()
Dim ws As Worksheet, i As Long, x As Range
Application.ScreenUpdating = False
With Sheets("CONTROL")
.Select
For Each ws In Worksheets(Array(2, 3, 4, 5, 6, 7))
If ws.Name <> Me.Name Then
With ws.Range("b9").CurrentRegion
For i = 1 To .Rows.Count Step 2
If x Is Nothing Then
Set x = .Rows(i).EntireRow.Range("b1,g1:h1")
Else
Set x = Union(x, .Rows(i).EntireRow.Range("b1,g1:h1"))
End If
Next
End With
If Not x Is Nothing Then
.Range("b" & Rows.Count).End(xlUp)(2).Select
x.Copy
Me.Paste link:=True
End If
Set x = Nothing
End If
Next
.[b3].Select
End With
With Application
.CutCopyMode = False
.ScreenUpdating = True
End With
End Sub
Bookmarks