Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple IF statements looking up multiple ranges. | Excel Worksheet Functions | |||
Can I create Multiple passwords to edit multiple ranges? | Excel Discussion (Misc queries) | |||
How do i update multiple data ranges across multiple worksheets? | Excel Discussion (Misc queries) | |||
Looping in VB with cell ranges | Excel Worksheet Functions | |||
Multiple Consolidation Ranges | Excel Discussion (Misc queries) |