learninman
New Member
- Joined
- Aug 1, 2011
- Messages
- 29
Hi
I recently made a thread about selecting every other row and recieved help and got this code:
Sub OtherRow()Dim
LR As Long, i As Long, r As Range
With Sheets("Sheet1")
LR = .Range("A" & Rows.Count).End(xlUp).Row
Set r = .Rows(1) For i = 3 To LR Step 2
Set r = Union(r, .Rows(i))
Next i
End With
r.Copy Destination:=Sheets("Sheet2").Range("A1")
End Sub
</PRE>
But I am in need of instead of selecting every other row or column, I need to select every other cell in a row. Is this possible?
I recently made a thread about selecting every other row and recieved help and got this code:
Sub OtherRow()Dim
LR As Long, i As Long, r As Range
With Sheets("Sheet1")
LR = .Range("A" & Rows.Count).End(xlUp).Row
Set r = .Rows(1) For i = 3 To LR Step 2
Set r = Union(r, .Rows(i))
Next i
End With
r.Copy Destination:=Sheets("Sheet2").Range("A1")
End Sub
</PRE>
But I am in need of instead of selecting every other row or column, I need to select every other cell in a row. Is this possible?
Last edited: