Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Referencing cells that array covers


Within VB, how do you reference the cells that your array formula i
entered in?

e.g. Range A1 to A10 has an array formula entered into it. Within th
code, I need to identify that this covers 10 cells.

NB 'Selection.Count' is not valid since this only works at the time th
user enters the array formula, and not on subsequent recalcs when othe
cells may be active

--
mayr
-----------------------------------------------------------------------
mayre's Profile: http://www.excelforum.com/member.php...fo&userid=2760
View this thread: http://www.excelforum.com/showthread.php?threadid=47129

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Referencing cells that array covers

If you record a macro when you do:

Select A1, then
edit|goto|special
you can click Current array.

You'll end up with code that resolves to something like:

MsgBox Range("a1").CurrentArray.address
or
MsgBox Range("a1").CurrentArray.cells.count




mayre wrote:

Within VB, how do you reference the cells that your array formula is
entered in?

e.g. Range A1 to A10 has an array formula entered into it. Within the
code, I need to identify that this covers 10 cells.

NB 'Selection.Count' is not valid since this only works at the time the
user enters the array formula, and not on subsequent recalcs when other
cells may be active.

--
mayre
------------------------------------------------------------------------
mayre's Profile: http://www.excelforum.com/member.php...o&userid=27605
View this thread: http://www.excelforum.com/showthread...hreadid=471297


--

Dave Peterson
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
Referencing a named array mooresk257 Excel Discussion (Misc queries) 1 October 26th 09 08:14 PM
Referencing an array formula Sh Excel Discussion (Misc queries) 2 May 26th 09 11:34 PM
Referencing an array name Henrik Excel Discussion (Misc queries) 2 December 2nd 06 09:27 PM
Expanding Gray Bar That Covers Excel Cells [email protected][_2_] Excel Programming 0 January 18th 05 02:24 PM


All times are GMT +1. The time now is 11:43 PM.

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

About Us

"It's about Microsoft Excel"