Hello. Someone gave me this code. Could someone explain what it is doing?
How does the multiple arguments in the range work? I didn't know you could do that. I don't get the nested for each...The first part is saying for each cell and then the second part is saying for each cell again but resize the cell? Is that resizing each cell? And then it's taking that resized cell and resizing it again? This code is simple but confusing lol.
What this code is doing is looping through three "tables", taking each row copying it below and offsetting the starting point one column to the right (so it's staggered)
Sub offset()
Dim cell As Range
Dim cel As Range
For Each cell In Range("A6,O6,AC6")
For Each cel In cell.Resize(12)
cel.Resize(, 13).Copy cel.offset(15, cel.row - 6)
Next cel
Next cell
End Sub
Bookmarks