I have excel workbook with two sheets: sheet1 has a large table of data in columns A to R, headers at row 1. Sheet2 has data in columns A to AO.
Using VBA I am trying to copy rows from sheet1 and paste them to the end of sheet2. Also I need to copy only columns A to R, not the entire row.
In other words, cells A2:R2 from sheet1 need to be copied to first AND second row that don't have data in column A.
Any help is highly appreciated!
@AlistairWeir, I have a following code that copies the required cells from sheet1, but I cannot figure out how to copy every row twice.
Sub example()
For Each ce In Range("A2:A" & Cells(Rows.Count, 1).End(xlUp).Row)
If Not IsEmpty(ce) Then
Sheets("sheet2").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Resize(1, 18).Value = Range(ce, ce.Offset(0, 17)).Value
End If
Next ce
End Sub