Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 395
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 395
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Array formula: how to join 2 ranges together to form one array? Rich_84 Excel Worksheet Functions 2 April 1st 09 06:38 PM
Return a cell value based on specific combinations of cells in an array rmcnam05 Excel Worksheet Functions 2 October 11th 05 03:28 AM
Referencing cells that array covers mayre Excel Programming 1 September 28th 05 03:00 PM
Referencing cells text output if it meets specific conditions Chersie Excel Worksheet Functions 3 April 18th 05 04:34 PM
variant array containing cel adresses convert to actual ranges-array Peter[_21_] Excel Programming 5 December 10th 03 09:50 PM


All times are GMT +1. The time now is 12:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"