View Single Post
  #1  
Old 07-04-2009, 03:14 PM
deadlyduck deadlyduck is offline
Valued Forum Contributor
 
Join Date: 31 Aug 2007
Location: SW Ireland
Posts: 273
deadlyduck is becoming part of the community
Trying to replace INDIRECT with INDEX or another function

I am working on a spreadsheet which contains a number of reference data sheets (named “Reference data 2009”, “Reference data 2010” etc). As their names suggest, these sheets contain reference data applicable to the particular year. This reference data is used to perform various calculations in a “Calculations” sheet.
On the “Calculations” sheet, the user specifies the year for which they wish to perform calculations. At present, I am using the volatile INDIRECT function to perform various HLOOKUP calculations along the following lines:

=IF(D15>=HLOOKUP('Detailed net pay calculations'!D16, INDIRECT("'Reference data" & 'Detailed method'!$C$2 & 'Detailed net pay calculations'!D1 & "'!$B$43:$Y$52"), 4, FALSE), “Do something”, “Do something else”)


The reason I'm using the INDIRECT function is to identify the sheet with the appropriate year (hence "Reference data"&'Detailed method'!$C$2&'Detailed net pay calculations'!D1 which could be interpreted by Excel as "'Reference data 2009NEW" or "'Reference data 2010", depending on whether there's text in cell D1).

My query
The function I'm using is working perfectly fine but I am wondering if it is possible to replace the INDIRECT function (in red) with INDEX or another non-volatile function in order to reduce the performance impact (I have a fairly large number of these types of functions).

If required, I can post a stripped down version my spreadsheet.
__________________
Excel 2003 user (and starting to warm to Excel 2007)

Last edited by deadlyduck; 07-05-2009 at 12:52 PM.
Reply With Quote