I am fairly new to VBA and am struggling with this. I was hoping that you guys out there who are far smarter than I would have a solution. I am working on a macro that will copy and paste from and an unknown number of sheets into one master sheet all within the same workbook. I want to paste information starting in row 1 in the next empty column. The problem is that the range to be copied from each sheet starts in column B and can vary in size as well. Here is the code I have:
Sub CompileEntries()
Dim ws As Integer
For Each ws In ActiveWorkbook.Worksheets
If ws.Name <> "Master" Then
ws.Range("B1").CurrentRegion.Copy
Worksheets("Master").Activate
Range("IV1").Select
Selection.End(xlToLeft).Select
ActiveCell.Offset(0, 1).Select
ActiveSheet.Paste
End If
Next ws
End Sub
Any help would be greatly appreciated. One day I hope I am knowledgeable enough with VBA to return the favor.
Ty
Sub CompileEntries()
Dim ws As Integer
For Each ws In ActiveWorkbook.Worksheets
If ws.Name <> "Master" Then
ws.Range("B1").CurrentRegion.Copy
Worksheets("Master").Activate
Range("IV1").Select
Selection.End(xlToLeft).Select
ActiveCell.Offset(0, 1).Select
ActiveSheet.Paste
End If
Next ws
End Sub
Any help would be greatly appreciated. One day I hope I am knowledgeable enough with VBA to return the favor.
Ty