LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 279
Default Avoiding redundant calculations

I am using Excel 2003 on Windows Vista.
Mostly, I do little calculation in worksheets. I do everything with VBA
in PERSONAL.XLS.
However, I have a new working formula:
<=INT(--(A2<A1)*VLOOKUP($F2,Stations,38,TRUE)+--(A2<A3)*VLOOKUP($G2,St
ations,38,TRUE))
which is copied through to about 3000 rows.
i.e. it does about 6000 VLOOKUP calls and takes a few minutes.
--(A2<A1) and -(A2<A3) evaluate as 1 or 0.
The VLOOKUP calls are unnecessary if those expressions result in 0.
This applies to about 80% of the VLOOKUP calls.
I would like to avoid that 80%.
One thought is the IF function, but that does not do lazy evaluation.
e.g. =IF(True,Truepart,Falsepart) calculates both Truepart and
Falsepart.
I could use a UDF, but prefer the simplicity of calculations in
worksheets.
I would value light from microsoft.public.excel.worksheet.functions.
--
Walter Briscoe
 
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
stop redundant calls to UDF ep Excel Programming 0 February 20th 08 11:37 PM
Redundant data ale Excel Discussion (Misc queries) 1 May 14th 07 06:51 PM
Redundant Striker Excel Programming 1 August 23rd 06 01:46 PM
minimizing redundant code dreamz[_31_] Excel Programming 4 March 10th 06 08:17 PM
finding redundant data eternal_cat via OfficeKB.com Excel Worksheet Functions 1 December 8th 05 07:53 AM


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