Indirect Function Alternative

Littlemalky

Board Regular
I started using the INDIRECT function to create a super dynamic Sumif that references a named range based on criteria. However, I noticed that my calculation time has increased significantly since taking this approach. I read online that this is a very volatile function that performs slowly. Is there an alternative to my approach that would increase my calc time? My formula us as such:

=SUMIFS(SALES,INDIRECT(LEFT($B8,2)&"_CODE"),$B8,MONTH_NUM,D$3,SCENARIO,D$6)

I'm using named ranges in my Criteria Ranges and you can see the INDIRECT function is looking for the first two digits of the cell i'm referencing and tacking on _CODE which will reference various named ranges.

Anybody have ideas?
 

=ODIN=

Active Member
So I can't give you an example of exactly how to try this in your situation, but I think the Choose function could be an alternative here. The Choose function takes a bit of creativity to setup as your dynamic choice must boil down to an number, but it is quite fast and allows you to dynamically return a range reference that can be used in other formulas, including sumifs.
 

Some videos you may like

This Week's Hot Topics

  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • find many based on a certain criteria
    good evening, I hope someone can help me? I have a workbook sheet 2 contains lots of data.... I would like to be able to find anything on sheet...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
  • Text Format
    I have a sheet for user to keyin the data. The format of the data can be 451 / 1903, 0012 / 9908 or 00287 / 0099. The number after the "/" is...
  • Macro to copy values across rows and transposing them and add the user id
    [FONT=Times New Roman][SIZE=3][COLOR=#000000][/COLOR][/SIZE][/FONT][FONT=Calibri][SIZE=3][COLOR=#000000]Hi,[/COLOR][/SIZE][/FONT] [FONT=Times New...
Top