-
How do I change the following code to include multiple sheets vs. only one?
Sub DoLoop()
Dim i As Integer
Dim sNCell As String
Set currentCell = Worksheets("Sheet1").Range("B2")
i = 1
Do While Not IsEmpty(currentCell)
i = i + 1
sNCell = "N" & i
Worksheets("Sheet1").Range("N2").Copy _
Destination:=Worksheets("Sheet1").Range(sNCell)
Set nextCell = currentCell.Offset(1, 0)
Set currentCell = nextCell
Debug.Print currentCell
Loop
Any ideas are helpful. Thanks!!!
-
I haven't tested this because i am not really sure what or where that code is supposed to be / do, but it may work.
Code:
Dim myWS as WorkSheet
For Each myWS in WorkSheets
'....
'Code
'....
Next
-
Thanks for the help!!!! Any other suggestions are also welcome.