Newsgroups: microsoft.public.excel.programming
From: Laurent Longre <lon...@wanadoo.fr>
Date: 1998/12/04
Subject: Re: [a1] syntax
Bonjour,
In VBA, [Anything] is equivalent to Application.Evaluate("Anything") Evaluate("Anything") and [Anything] evaluates and returns the result of [SUM(1,2,4,8)] returns 19 [AVERAGE(A1:A100)/Sheet2!A1] returns the same result as the Since worksheet formulae can return not only values but also range [Sheet3!A1] = 5 puts '5' in the range Sheet3!A1 (you could also use Set MyRange = [OFFSET(A1:C30,3,3)] stores a reference to the range ... and so on. Evaluate/[] can also return the result of an array formula (exactly like [SUM((A1:A100>10)*(B1:B100<50)] returns the same result as the array MyArray = [ROW(1:10000)] stores the 2 dimensional array (1 column) [A1:A5000] = [ROW(1:5000)] puts the values 1, 2, ..., 5000 in the range This feature allows VBA user-defined functions to use (to a certain Function NBCHAR(MyRange As Range) As Long This function is equivalent to the array formula {=SUM(LEN(Range))}. Function NBCHAR2(MyRange As Range) As Long If you test both functions and pass to them references to very large Unfortunately you can't use VBA arrays in this way, but otherwise it's a Hope this helps, Laurent Bill Koran wrote:
> Please defer to Mr. Beban's coming (I hope) reply, because I'm a newbie to > is exactly equivalent to > Set rng = showcell.("a1") > In other words, anyplace you would refer to a range using the parentheses > Bill > Brian Wilson <b...@ccms.net> wrote in article <3666BFD8.B4FAE...@ccms.net>... > > I've read you're postings this week. I'm curious, would > > Set rng = showcell.[a1] > > Is Range(rng(2, 1), rng(101, 35)) the best "shorthand" > > Thanks, > > Brian > > Alan Beban wrote: > > > John Green wrote: > > > > This will work when the referenced worksheet is active, not > > > > With showcell > > > The above involves "qualifying" the Cells Method/Property. One can also > > > Set rng = showcell.[a1] > > > Sorry, John; after our recent exchange of comments, I couldn't resist > > > Alan Beban be...@pacbell.net You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||