LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default How to use Implicit Intersection in a VBA Function

The [] bracket notation is actually a shortcut for Application.Evaluate, so
you can use it to evaluate formulae as well as Range Names.
Its also interesting to note that it evaluates Formulae as though they were
array formulae.

So Jim's function is evaluating
arr = [Sales - Costs]
as an array formula returning all the results to a variant containing an
array.

See also
http://www.decisionmodels.com/calcsecretsh.htm

for some details of the limitations of the Evaluate method.

Charles
__________________________________________________
The Excel Calculation Site
http://www.decisionmodels.com

"Jim Cone" wrote in message
...
James,
You are welcome.
'--
Using range shortcut notation brackets may be the only instance
where you can use range names without enclosing them in quote marks.
Also, using that method may be slower than other types of range
references.
If you have a sheet with 10,000 of those functions you might be unhappy.
In addition, please note Charles Williams' post about function
calculation.
--
Jim Cone
Portland, Oregon USA



"James Buist"
wrote in message
Jim
Thats Brilliant.
I had no idea you could refernce names in VB by just using them. I have
been
explicitly defining the names i need in VB by declaring a range variable
and
setting its value with a Range Name from the workbook.
Many thanks for that!!
James



"Jim Cone" wrote:
Charles,
Noted and thanks.
--
Jim Cone
Portland, Oregon USA



"Charles Williams"
wrote in message
Jim,
I like your use of evaluate, but I think you would have to make the
function
volatile otherwise it will sometimes not recalculate properly, because it
is
using cells via the names which are not being passed as parameters.
regards
Charles
The Excel Calculation Site
http://www.decisionmodels.com





 
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
intersection function tarheelrooster Excel Discussion (Misc queries) 2 October 16th 09 10:30 AM
implicit file reference Tuee Excel Programming 4 February 10th 06 02:55 PM
I NEED A FUNCTION TO FIND IF THERE IS AN INTERSECTION BETWEEN 2 DATE RANGES MissSara Excel Worksheet Functions 10 September 7th 05 09:40 PM
I NEED A FUNCTION TO FIND IF THERE IS AN INTERSECTION BETWEEN 2 DATE RANGES MissSara Excel Programming 10 September 7th 05 09:40 PM
implicit activation jgreif Excel Programming 0 May 26th 05 01:59 AM


All times are GMT +1. The time now is 06:43 AM.

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"