Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Anita Morales   on Feb 18 In MS Office Category.

  
Question Answered By: Ludkhannah Fischer   on Feb 18

I've seen this before. I think you'll need to copy the cells  individually.

However, if you are really copying a consecutive group of cells like this, you
can use a colon-delimited range  and use the .copy method. I.e.:

Option Explicit

Dim myRangeCounter7 As Range
Dim myRangeCounter6 As Range
Dim myRangeCounter5 As Range
Dim myRangeCounter4 As Range

Sub DeclareCounterRanges()
Set myRangeCounter7 = Worksheets("Sheet1").Range("G7:J7")
Set myRangeCounter6 = Worksheets("Sheet1").Range("G6:J6")
Set myRangeCounter5 = Worksheets("Sheet1").Range("G5:J5")
Set myRangeCounter4 = Worksheets("Sheet1").Range("G4:J4")
Call MoveCounterRanges
End Sub

Sub MoveCounterRanges()
Call myRangeCounter5.Copy(Destination:=myRangeCounter4)
Call myRangeCounter6.Copy(Destination:=myRangeCounter5)
Call myRangeCounter7.Copy(Destination:=myRangeCounter6)
End Sub

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Help with Range Object Or get search suggestion and latest updates.


Tagged: