View Full Version : Solved: Variable Help

Mr Mike
08-10-2005, 12:18 PM
Note this Macro text
RegOneTotalRow = Range("84:84").Row
RegTwoTotalRow = Range("197:197").Row
RegThreeTotalRow = Range("245:245").Row
RegFourTotalRow = Range("363:363").Row
RegFiveTotalRow = Range("445:445").Row
RegSixTotalRow = Range("459:459").Row
RegSevenTotalRow = Range("515:515").Row
RegEightTotalRow = Range("573:573").Row
RegNineTotalRow = Range("659:659").Row
RegTenTotalRow = Range("702:702").Row

Is there a way I can have the Ranges (i.e. "84:84") point to a value in an actual cell in a worksheet... so that if I change the number in that cell, the Row Ranges on this Macro adjusts?

Thanks for your help!

Jacob Hilderbrand
08-10-2005, 12:50 PM
RegOneTotalRow = Range(" & Range("A1").Value & ":" & Range("A1").Value &").Row

And since you only want the row, this should suffice.

RegOneTotalRow = Range("A1").Value

Mr Mike
08-10-2005, 01:27 PM
Worked great... Thanks for you help!

Jacob Hilderbrand
08-10-2005, 01:49 PM
You're Welcome :beerchug:

Take Care