![]() |
Referencing specific cells in an array of ranges
I have declared
Public AllRanges(1 To 10) As Range and assigned various ranges to each of the 10 array elements. Then I use other analyses to identify two "cells" of interest. I'm having trouble with properly referring to individual cells within the array of ranges. For example, I would expect something like the following to give me the value of the first cell in the first range: Debug.print AllRanges(1)(1,1) or maybe Debug.print AllRanges(1)(1,1).value Since my ranges are all single columns, I also tried to reference this as a 1-D array Debug.print AllRanges(1)(1) and Debug.print AllRanges(1)(1).value but still no luck. Can anyone help me with the syntax of how to properly reference a single cell's value within an array of ranges? Many thanks, Keith |
Referencing specific cells in an array of ranges
This is now working- apologies for the extra bandwidth.
"ker_01" wrote: I have declared Public AllRanges(1 To 10) As Range and assigned various ranges to each of the 10 array elements. Then I use other analyses to identify two "cells" of interest. I'm having trouble with properly referring to individual cells within the array of ranges. For example, I would expect something like the following to give me the value of the first cell in the first range: Debug.print AllRanges(1)(1,1) or maybe Debug.print AllRanges(1)(1,1).value Since my ranges are all single columns, I also tried to reference this as a 1-D array Debug.print AllRanges(1)(1) and Debug.print AllRanges(1)(1).value but still no luck. Can anyone help me with the syntax of how to properly reference a single cell's value within an array of ranges? Many thanks, Keith |
All times are GMT +1. The time now is 05:32 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com