Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
looping through an array of ranges
I am trying this code but am getting message, "can't assign to array" and the
RangeVY is highlighted (see after @) any help on looping through many arrays would be appreciated. thanx ' I also tried Dim RangeVY As varient but got user defined type not defined Dim RangeVY(3) As Range @RangeVY = Array("V2", "W2", "X2", "Y2") For i = LBound(RangeVY) To UBound(RangeVY) Do Until ActiveCell.Offset(0, 0) = "" Call DR6_Variances_Calculations_Subroutine_1 Loop Sub DR6_Variances_Calculations_Subroutine_1() ActiveCell.FormulaR1C1 = "=ROUND(RC[-10]-RC[-5],2)" ActiveCell.Offset(1, 0).Select End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
looping through an array of ranges
Try:
Dim RangeVY() RangeVY = Array("V2", "W2", "X2", "Y2") Regards Trevor "Arnold Klapheck" wrote in message ... I am trying this code but am getting message, "can't assign to array" and the RangeVY is highlighted (see after @) any help on looping through many arrays would be appreciated. thanx ' I also tried Dim RangeVY As varient but got user defined type not defined Dim RangeVY(3) As Range @RangeVY = Array("V2", "W2", "X2", "Y2") For i = LBound(RangeVY) To UBound(RangeVY) Do Until ActiveCell.Offset(0, 0) = "" Call DR6_Variances_Calculations_Subroutine_1 Loop Sub DR6_Variances_Calculations_Subroutine_1() ActiveCell.FormulaR1C1 = "=ROUND(RC[-10]-RC[-5],2)" ActiveCell.Offset(1, 0).Select End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
LOOPING multiple ranges | Excel Discussion (Misc queries) | |||
Looping through named ranges | Excel Programming | |||
Any easier way than looping on ranges | Excel Programming | |||
Looping through Ranges of Rows | Excel Programming | |||
Looping through Ranges of Rows | Excel Programming |