Hello!
My ultimate goal is to pull 3 types of information from n number of worksheets into a summary page. I was successful with copying and pasting unique values (see below), however, I am having issues copying one cell from each worksheet and having it repeat multiple times.
I have multiple worksheets that look something like this:
<tbody>
</tbody>
My code for copying ID and Color is:
Without having to count the number of entries myself, how do I now copy "Amanda" for each entry for Amanda (in this case 3 times)? Thanks!
My ultimate goal is to pull 3 types of information from n number of worksheets into a summary page. I was successful with copying and pasting unique values (see below), however, I am having issues copying one cell from each worksheet and having it repeat multiple times.
I have multiple worksheets that look something like this:
Amanda | |
ID | Color |
1 | Blue |
2 | Blue |
3 | Gold |
<tbody>
</tbody>
My code for copying ID and Color is:
Code:
Private Sub CommandButton1_Click()
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
If Not wks.Name = "Summary" Then
wks.Range("A7:A" & wks.Cells(Rows.Count, "A").End(xlUp).Row).Copy _
Destination:=Worksheets("Summary").Cells(Rows.Count, "A").End(xlUp).Offset(1)
wks.Range("D7:D" & wks.Cells(Rows.Count, "D").End(xlUp).Row).Copy _
Destination:=Worksheets("Summary").Cells(Rows.Count, "B").End(xlUp).Offset(1)
End If
Next
End Sub
Without having to count the number of entries myself, how do I now copy "Amanda" for each entry for Amanda (in this case 3 times)? Thanks!