+ Reply to Thread
Results 1 to 6 of 6

Percentile Array Formula Limited to 25000 Rows?

  1. #1
    Registered User
    Join Date
    03-16-2021
    Location
    Bournemouth, England
    MS-Off Ver
    Office 365
    Posts
    4

    Percentile Array Formula Limited to 25000 Rows?

    Hi, I am using an Array formula (see below), which works fine unless I increase the last row number from 25000 to 25001. Is there a limit to how many rows can be used for an Array formula? I understand they are very inefficient and it's not recommended to use entire column references, which I had initially tried with no luck. My data set goes up to row 27445, which is why I started with the entire column reference - especially as the final row number will change as more data is added to the worksheet. I settled for entering specific cell references in the formula instead, but for some reason it will not work when entering a number over 25000!

    =IFERROR(PERCENTILE(IF('Completed Orders'!$CG$2:$CG$25000='Table1'!G4,'Completed Orders'!$BP$2:$BP$25000),0.98),"")

    The criteria for the Percentile formula is for cell G4 (a Concatenation) to match values in column CG (or $CG$2:$CG$25000) on the 'Completed Orders' worksheet. It must then return the 98th percentile of values in column BP, which are whole numbers. As stated, the formula works - I just want it to work for rows greater than 25000 as well! Thanks

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Percentile Array Formula Limited to 25000 Rows?

    Quote Originally Posted by EXCEL1BUR View Post
    it will not work when entering a number over 25000!
    Please explain what "will not work" means. What are you expecting and what happens instead? If you are getting a blank result, leave off the IFERROR and see what error you get. Have you tried stepping through formula evaluation?

    I assume you are changing 25000 in both places. What are the values in cells 'Completed Orders'!CG25001 and BP25001?

    There is no limit to the number of rows that be included in an array formula. Microsoft pages show examples using an entire column, and examples with 1,048,576 rows (which is also the entire column). It does warn of long calculate times if you do this, but it works.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    03-16-2021
    Location
    Bournemouth, England
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Percentile Array Formula Limited to 25000 Rows?

    OK I didn't explain that well! So, I will be using this same formula in other cells looking at G4, G5, G6, etc. all the way to G51. The IFERROR was purposefully put in to return a blank as some rows would not always return a value for the formula mentioned and I didn't want the table to be full of errors. For testing purposes, I've removed the IFERROR to see what returns when increasing the row numbers. The following formula returned '5', which is what I'd expect to see:

    =PERCENTILE(IF('Completed Orders (E2E)'!$CG$2:$CG$25000=G4,'Completed Orders (E2E)'!$BP$2:$BP$25000),0.98)

    When changing the row numbers from 25000 to 26000 (see below), it returns '#N/A'. There is data in both those columns up to row 27445 and there are no errors in either column, which often causes a subsequent error.

    =PERCENTILE(IF('Completed Orders (E2E)'!$CG$2:$CG$26000=G4,'Completed Orders (E2E)'!$BP$2:$BP$26000),0.98)

  4. #4
    Registered User
    Join Date
    03-16-2021
    Location
    Bournemouth, England
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Percentile Array Formula Limited to 25000 Rows?

    Well I say there are no errors - just spotted one! Out of 27445 cells, there is one (CG25496) with an error, which explains why my percentile formula won't work for the entire column. I should have opened my eyes (sigh)!

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Percentile Array Formula Limited to 25000 Rows?

    That's what we're here for

    I can't count how many times I was staring an error right in the face and it took someone else with fresh eyes to see it.

  6. #6
    Registered User
    Join Date
    03-16-2021
    Location
    Bournemouth, England
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Percentile Array Formula Limited to 25000 Rows?

    Thanks

    I also realised it didn't need to be an array formula. I saw someone recommend it on another post (don't ask which one) for a similar type of calculation, but it seems to work fine without. Unless you know why it may be beneficial/necessary to use array for this type of formula, i.e. PERCENTILE with multiple criteria? It now references the entire columns as well, e.g. $CG:$CG, so I assume it would just crash if using an array formula? I've heard they can be extremely slow!

+ 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. Help with Percentile Array Formula
    By jeffmlucas in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-18-2017, 11:54 AM
  2. Replies: 4
    Last Post: 10-07-2015, 12:02 PM
  3. WorksheetFunction.Percentile - Array Formula
    By Fjcosta in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-03-2015, 02:54 PM
  4. Copy Blocks of 25000 rows into new sheet excel 2010
    By drexel03 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-29-2014, 07:45 PM
  5. PERCENTILE Using Array Formula
    By Azad in forum Excel General
    Replies: 4
    Last Post: 05-04-2010, 03:48 AM
  6. Searching a limited amount of rows in a vertical array
    By Joe Miller in forum Excel General
    Replies: 12
    Last Post: 08-22-2006, 06:34 AM
  7. pivot table error (25000 rows!!)
    By Craig_Richards in forum Excel General
    Replies: 1
    Last Post: 11-13-2005, 02:55 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