+ Reply to Thread
Results 1 to 6 of 6

Improve performance

  1. #1
    Registered User
    Join Date
    09-12-2019
    Location
    portugal
    MS-Off Ver
    2016
    Posts
    4

    Improve performance

    Hi guys,

    I have an excel with 12 sheets and I have some characteristic:

    -I have a sheet for filters, where I am using
    -IFERROR
    -INDEX
    -MATCH
    -COUNTIF
    -NAME MANAGER
    this is an example: ='SheetName'!$A$2:INDEX('SheetName'!$A$2:$A$100000,COUNTA('SheetName'!$A$2:$A$100000))

    -I am using data validation as a drop-down list

    -I have some formulas to show values like : =IF(OR(ISBLANK($M$5),$M$5="ALL"),'Main1'!B2,IF(OR(ISBLANK($S$5),$S$5="ALL"),'Main2'!B2,'Main3'!B2))

    -I have formulas to blank cells because I don't know until cell the user will put values. I found some tricks and this is not recommended but I don't know how to do this dynamically

    =IFERROR(INDEX($B$2:$B$1000,$E374,COLUMNS($F$1:F374)),"")

    For example, at this moment is not necessary that the formulas go until row number 5000 because my data go until row number 61, how can I do this dynamically?

    So please, help me, when I do some filters my excel sheet spends a lot of time to calculate the formulas and show the result.

    What can do I? minimize the quantity sheets? change the formulas?

    thank you.
    Last edited by 6StringJazzer; 04-09-2020 at 12:59 PM. Reason: Moderator corrected a particularly unfortunate typo

  2. #2
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    604

    Re: Improve performance

    Hi Twister, this following formula should return the row number of the last non-blank cell in a column. Maybe you could use this to replace your 5000 etc.
    Please Login or Register  to view this content.
    Last edited by Beamernsw; 04-10-2020 at 08:33 AM.

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,811

    Re: Improve performance

    It's difficult to make specific suggestions without understanding exactly how it all works together. A couple of common things to look at:

    1) In your list of functions that you are using, the main "slow" function is MATCH(). A filtering operation is going to require many lookup type functions, so you will want to make sure your lookup steps are well designed.
    1a) Spend some time with your database and your lookup function and see if it can be structured to use one of the approximate match options rather than the exact match option. The binary search algorithms used in the approximate match functions are much faster than the linear search algorithm in the exact match algorithm.
    1b) Watch out for duplicated effort. Most of the time, we nest the MATCH() function inside of the INDEX() function, which often leads to performing the exact same slow lookup multiple times (find where "John" is in "names" column). We have seen significant performance improvements by moving the MATCH() functions into their own helper column(s) so that we minimize the number of lookups that are required.
    2) Watch out for duplicated effort with your counting functions. For example, every copy of this function ='SheetName'!$A$2:INDEX('SheetName'!$A$2:$A$100000,COUNTA('SheetName'!$A$2:$A$100000))
    is counting how many entries there are in column A of SheetName. Again, move the counting function into a helper cell so that Excel need only count the number of entries once.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    09-12-2019
    Location
    portugal
    MS-Off Ver
    2016
    Posts
    4

    Re: Improve performance

    First of all, thank you for your answer, I will try it.

  5. #5
    Registered User
    Join Date
    09-12-2019
    Location
    portugal
    MS-Off Ver
    2016
    Posts
    4

    Re: Improve performance

    HI, how can I use the named manager in this case?
    =SUMPRODUCT(MAX(($A:$A<>"")*(ROW(A:A))))
    I would like to do something: =IF(ISNUMBER(SEARCH(Main!$G$5,A2:Last_row_Table_1)),C2,"") where Last_row_Table_1 is ="A" & SUMPRODUCT(MAX(('Table 1'!$A:$A<>"")*(ROW('Table'!XFA:XFA))))

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: Improve performance

    The formula in post #5, =IF(ISNUMBER(SEARCH(Main!$G$5,A2:Last_row_Table_1)),C2,""), would seem to indicate that a value is being searched for in a column of an Excel table. If that is the case then the formula should adjust as the table is expanded vertically. Would seem the formula could read: =IF(ISNUMBER(SEARCH(Main!$G$5,A2:A61)),C2,"") and then when the table is expanded to include A62 the formula should adjust accordingly.
    As MrShorty states, it would be easier to help if we could see how this works. A good way to do that is to utilize the instructions in the banner at the top of the page to upload a sample workbook.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 03-29-2017, 02:08 AM
  2. How to improve performance of my code?, now is too slow!!
    By Laurelb in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-25-2015, 03:15 PM
  3. [SOLVED] Can VBA improve the performance of this spreadsheet
    By gassiusmax in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-29-2014, 05:19 AM
  4. improve performance
    By david90 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-28-2013, 01:12 AM
  5. Improve Performance of Form with 80 Dlookups
    By Whizbang in forum Access Tables & Databases
    Replies: 3
    Last Post: 10-18-2011, 05:11 PM
  6. How to improve the performance of a looping UDF
    By johnnycanuck in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-03-2011, 01:39 PM
  7. PageBreak problem. How to improve performance?
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-22-2005, 09:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1