J
Jase
I have a looping code that grabs a range from 1 page and pastes onto another.
My only problem is that I need to grab multiple ranges for example
range("H31:J31") and range("J33:L33") and paste them into Sheet1 Range("D32")
and Range("E43") respectively. Any idea on how to do multiple ranges?
Dim DestCell As Range
' Dim RngToCopy As Range
'
' With Worksheets("Sheet2")
' Set RngToCopy = .Range("H31:J31")
' End With
'
' With Worksheets("Sheet1")
' Set DestCell = .Range("D32")
' End With
'
' Do
' If Application.CountA(RngToCopy) = 0 Then
' Exit Sub
'
' Else
' RngToCopy.Copy
' DestCell.PasteSpecial Paste:=xlPasteValues
'
' Set RngToCopy = RngToCopy.Offset(50, 0)
' Set DestCell = DestCell.Offset(50, 0)
'
' End If
' Loop
My only problem is that I need to grab multiple ranges for example
range("H31:J31") and range("J33:L33") and paste them into Sheet1 Range("D32")
and Range("E43") respectively. Any idea on how to do multiple ranges?
Dim DestCell As Range
' Dim RngToCopy As Range
'
' With Worksheets("Sheet2")
' Set RngToCopy = .Range("H31:J31")
' End With
'
' With Worksheets("Sheet1")
' Set DestCell = .Range("D32")
' End With
'
' Do
' If Application.CountA(RngToCopy) = 0 Then
' Exit Sub
'
' Else
' RngToCopy.Copy
' DestCell.PasteSpecial Paste:=xlPasteValues
'
' Set RngToCopy = RngToCopy.Offset(50, 0)
' Set DestCell = DestCell.Offset(50, 0)
'
' End If
' Loop