View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Arnold Klapheck Arnold Klapheck is offline
external usenet poster
 
Posts: 42
Default 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