M
MCheru
I want to change this code so that the same thing that happens in Sheet 2
will also happen in a 3rd worksheet called Sheet 3. Might you be able to
help?
Sub ML()
Dim rw As Long
Dim rngSource As Range
Dim rngDest As Range
Dim rng As Range
Set rngSource = Worksheets("Sheet 1").Range("A4:H200")
Set rngDest = Worksheets("Sheet 2").Range("B4")
With rngSource
Set rngDest = rngDest.Resize(.Rows.Count * 2, .Columns.Count)
End With
For Each rng In rngSource.Rows
rw = rw + 2
rngDest.Rows(rw).Value = rng.Value
Next
Set rngSource = Worksheets("Sheet 1").Range("Ak4:AK200")
rw = -1
For Each rng In rngSource
rw = rw + 2
rngDest(rw, 1).Formula = "=" & rng.Address(external:=True)
Next
End Sub
will also happen in a 3rd worksheet called Sheet 3. Might you be able to
help?
Sub ML()
Dim rw As Long
Dim rngSource As Range
Dim rngDest As Range
Dim rng As Range
Set rngSource = Worksheets("Sheet 1").Range("A4:H200")
Set rngDest = Worksheets("Sheet 2").Range("B4")
With rngSource
Set rngDest = rngDest.Resize(.Rows.Count * 2, .Columns.Count)
End With
For Each rng In rngSource.Rows
rw = rw + 2
rngDest.Rows(rw).Value = rng.Value
Next
Set rngSource = Worksheets("Sheet 1").Range("Ak4:AK200")
rw = -1
For Each rng In rngSource
rw = rw + 2
rngDest(rw, 1).Formula = "=" & rng.Address(external:=True)
Next
End Sub