+ Reply to Thread
Results 1 to 8 of 8

Avoid looking up all rows in a column to make spreadhseet faster

  1. #1
    Registered User
    Join Date
    04-02-2015
    Location
    Leeds
    MS-Off Ver
    2013
    Posts
    11

    Avoid looking up all rows in a column to make spreadhseet faster

    Hi,

    My excel sheet has become slow and I'm looking for ways to speed it up. One thing I found was that my formulas look up all of a column (eg they look up A:A instead of A1:A200). I've done this so that the formulas don't need to be updated when more data is added but now that my spreadsheet is becoming very slow, I wonder if there's a formaula solution to make this faster by automatically calculating how far down the formula should look. I'm thinking on the lines of a cell which counts the total number of rows that are not empty and then the other formulas looking up that cell to find out how far down a column they should look. Alternatively if there's any other way to do this or if you have any other more general tips on speeding up a spreadhseet I'd love to hear them.

    Thanks

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Avoid looking up all rows in a column to make spreadhseet faster

    You can use dynamic ranges.

    What type of data is it? Is it text? Numeric? Could be both? Something else?

    Is the data entered in a contiguous range or are there empty cells within the range?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    02-26-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    46
    Quote Originally Posted by Tony Valko View Post
    You can use dynamic ranges.

    What type of data is it? Is it text? Numeric? Could be both? Something else?

    Is the data entered in a contiguous range or are there empty cells within the range?
    It could be either.

  4. #4
    Registered User
    Join Date
    02-26-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    46
    Quote Originally Posted by Tony Valko View Post
    You can use dynamic ranges.

    What type of data is it? Is it text? Numeric? Could be both? Something else?

    Is the data entered in a contiguous range or are there empty cells within the range?
    Oh, and it's a continous range with no gaps. :-)

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,645

    Re: Avoid looking up all rows in a column to make spreadhseet faster

    To keep the formula simpler than using dynamic range solution:

    If your current used range is A1:A200. Highlight the rows 202, 203 with background red colour.

    Expand your range in formula to A1:A203.

    Choose row 201 and insert more rows (should be ABOVE row 202) for inputting data.
    Quang PT

  6. #6
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,883

    Re: Avoid looking up all rows in a column to make spreadhseet faster

    Use the Excel Table feature.
    http://contextures.com/xlExcelTable01.html
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  7. #7
    Registered User
    Join Date
    04-02-2015
    Location
    Leeds
    MS-Off Ver
    2013
    Posts
    11

    Re: Avoid looking up all rows in a column to make spreadhseet faster

    Quote Originally Posted by Jacc View Post
    Use the Excel Table feature.
    http://contextures.com/xlExcelTable01.html
    Hi Jacc,

    This is great thanks

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Avoid looking up all rows in a column to make spreadhseet faster

    Here is how to create some dynamic ranges.

    Data Range
    A
    B
    C
    1
    Range1
    Range2
    Range3
    2
    Bill
    83
    text
    3
    Tom
    65
    10
    4
    Sue
    91
    10
    5
    Barb
    22
    20
    6
    Carl
    99
    text
    7
    Karen
    89
    text
    8
    54
    9
    84
    10
    11
    12
    13
    14
    15


    Data Range
    E
    F
    2
    Range1
    =Sheet1!$A$2:INDEX(Sheet1!$A:$A, MATCH("zzzzz",Sheet1!$A:$A))
    3
    Range2
    =Sheet1!$B$2:INDEX(Sheet1!$B:$B, MATCH(1E100,Sheet1!$B:$B))
    4
    Range3
    =Sheet1!$C$2:INDEX(Sheet1!$C$2:$C$10000,COUNTA($C$2:$C$10000))


    In Range3 use an end of range that you think is large enough to allow for future data addition.

    Some example formulas...

    Data Range
    E
    F
    G
    2
    Range1
    6
    =COUNTA(Range1)
    3
    Range2
    5
    =COUNTIF(Range2,">75")
    4
    Range3
    3
    =COUNTIF(Range3,"Text")
    5
    ------
    ------

+ 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. [SOLVED] Make VBA Faster
    By icondor517 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-29-2013, 07:42 AM
  2. Replies: 2
    Last Post: 01-10-2013, 10:56 AM
  3. vlookup to last row for the column and make it faster to populate values.
    By NKRA in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2012, 04:08 PM
  4. Replies: 2
    Last Post: 01-16-2010, 09:27 AM
  5. can you make this faster?
    By John in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-25-2005, 04:05 PM

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