Hello,
I have a workbook that has a sheet called Master and one Attestations. Both of these pull information (specific rows) from all other sheets in the workbook. I currently have the code below that was working great with Master until I added Attestations. It still works but now it also pulls data from Master when I'm copy-pasting into Attestations and vice versa. I want to exclude these sheets when the information is being copied. What would be the simplest way to do that within the code below?
If I can figure out one, I can do the same for the other. The code below copies everything into Master and I want to exclude the sheet named Attestations from this.
Sub Consolidate()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "Master" Then
ws.Activate
Range("A7:I9").Copy
Sheets("Master").Select
Range("A" & Cells.Rows.Count).End(xlUp).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
Next
End Sub
Bookmarks