Hey Everyone!
I'm having trouble writing code to copy data from a table and paste the important columns under the original to compare the data. I needed to put this in a loop to go through all the sheets of the workbook.. Here is my code.. Any help will be appreciated!
Sub CopyData()
Dim WS_Count As Integer
Dim I As Integer
WS_Count = ActiveWorkbookWorksheets.Count
For I = 1 To WS_Count
ActiveWorkbook.Worksheets(I).Range("A1:F80").Copy
With ActiveSheet.Range("A85")
.PasteSpecial x1PasteFormats
.PasteSpecial x1PasteValue
End With
ActiveWorkbook.Worksheets(I).Range("L1:L80").Copy
With ActiveSheets.Range("G85")
.PasteSpecial x1PasteFormats
.PasteSpecial x1PasteValues
End With
Next I
End Sub
It Is givin me errors saying all merged cells need to be the same size??
I'm having trouble writing code to copy data from a table and paste the important columns under the original to compare the data. I needed to put this in a loop to go through all the sheets of the workbook.. Here is my code.. Any help will be appreciated!
Sub CopyData()
Dim WS_Count As Integer
Dim I As Integer
WS_Count = ActiveWorkbookWorksheets.Count
For I = 1 To WS_Count
ActiveWorkbook.Worksheets(I).Range("A1:F80").Copy
With ActiveSheet.Range("A85")
.PasteSpecial x1PasteFormats
.PasteSpecial x1PasteValue
End With
ActiveWorkbook.Worksheets(I).Range("L1:L80").Copy
With ActiveSheets.Range("G85")
.PasteSpecial x1PasteFormats
.PasteSpecial x1PasteValues
End With
Next I
End Sub
It Is givin me errors saying all merged cells need to be the same size??