SerPac87
Feb 23, 2023Copper Contributor
Help with a macro
Hi everyone, I am having a bad time with a Macro and I was hoping you would be able to help me. I have two tabs with data: -Data 1 -Data 2 I want to create a macro to take the data from Data 1 ...
- Feb 23, 2023
For example:
Sub CopyData() Dim ws As Worksheet Dim wt As Worksheet Dim t As Long Application.ScreenUpdating = False Set wt = Worksheets("Data combined") t = 1 For Each ws In Worksheets(Array("Data 1", "Data 2")) With ws.Range("A1").CurrentRegion .Copy Destination:=wt.Range("A" & t) t = .Rows.Count + 1 End With Next ws Application.CutCopyMode = False Application.ScreenUpdating = True End Sub