LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default User Defined Function - efficiencies.

This should be a bit more efficient, but I'm not sure it'll add up to
much:

Const R1_Sheet As String = "'C:\Documents and Settings\Owner\" & _
"My Documents\TableData1.xls'!A_Tables"
Const R2_Sheet As String = "'C:\Documents and Settings\Owner\" & _
"My Documents\TableData2.xls'!B_Tables"
Static A_Tables As Range
Static B_Tables As Range

If A_Tables Is Nothing Then _
Set A_Tables = Range(R1_Sheet)
If B_Tables Is Nothing Then _
Set B_Tables = Range(R2_Sheet)

In article ,
"Nick Earl" wrote:

I wasn't aware of the penalty for the 4th argument and will try index/match
method for comparison.

And, Thanks for your comment about not recalculating if the external tables
change. These tables are fairly static and I am aware that I will need to
keep the two workbooks in synch - this is a concern but not a problem right
now.

However, I still have the same questions about whether I can improve the
function by pre-loading the table values rather than re-reading them each
time they are called. Basically, I don't know how Excel behaves when using
the same table reference repetitively and if I can improve the processing by
anticipating the loading of the range objects.

Additionally, can I extract the other workbook data without opening them?

 
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
User Defined FUNCTION EAK Excel Discussion (Misc queries) 5 July 17th 08 07:07 PM
user defined function delmac Excel Worksheet Functions 1 August 11th 06 04:31 PM
User-defined data type; Error: Only User-defined types... tiger_PRM Excel Programming 1 July 18th 04 03:32 PM
USer Defined Function Excel Dummy[_2_] Excel Programming 2 November 5th 03 11:33 AM
User-Defined Function pre-empting Built-in Function? How to undo???? MarWun Excel Programming 1 August 6th 03 09:31 PM


All times are GMT +1. The time now is 09:06 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"