LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 117
Default LOOPING multiple ranges

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple IF statements looking up multiple ranges. mike Excel Worksheet Functions 7 August 9th 07 04:55 PM
Can I create Multiple passwords to edit multiple ranges? Conker10382 Excel Discussion (Misc queries) 8 December 31st 06 07:58 PM
How do i update multiple data ranges across multiple worksheets? mwah Excel Discussion (Misc queries) 0 July 6th 06 04:57 AM
Looping in VB with cell ranges Freeman Excel Worksheet Functions 2 January 22nd 06 12:14 PM
Multiple Consolidation Ranges Matt Cromer Excel Discussion (Misc queries) 0 December 1st 05 09:51 PM


All times are GMT +1. The time now is 09:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"