+ Reply to Thread
Results 1 to 6 of 6

How to ignor #N/A with INDEX, SORT and SEQUENCE formula

  1. #1
    Registered User
    Join Date
    03-01-2022
    Location
    Raleigh NC
    MS-Off Ver
    365
    Posts
    19

    How to ignor #N/A with INDEX, SORT and SEQUENCE formula

    The formula =INDEX(SORT(B2:TL80000,531,1),SEQUENCE(50),{1,2,3,5,6,531}) correctly returns 50 rows of six columns from a very large array (over 60,000 rows and hundreds of columns of data). It gives me the top 50 sorted smallest to largest. BUT when I change the "1" to a "-1" (in the SORT function) to get the top 50 sorted largest to smallest it returns many #N/A and no numbers. I need a simple way to modify this formula to ignore any #N/A's in the data.
    Any ideas? (Excel 365)

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: How to ignor #N/A with INDEX, SORT and SEQUENCE formula

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    03-01-2022
    Location
    Raleigh NC
    MS-Off Ver
    365
    Posts
    19

    Re: How to ignor #N/A with INDEX, SORT and SEQUENCE formula

    A much simplified sample is attached. The formula in K2 is good. The formula in Q2 needs modification to accommodate the #N/A's in column G.
    Attached Files Attached Files

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: How to ignor #N/A with INDEX, SORT and SEQUENCE formula

    Is this what you're looking for:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-01-2022
    Location
    Raleigh NC
    MS-Off Ver
    365
    Posts
    19

    Re: How to ignor #N/A with INDEX, SORT and SEQUENCE formula

    Yes, that does it. Thanks. I suspected I needed to use Filter and I looked at the ISNA but I couldn't put it all together.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: How to ignor #N/A with INDEX, SORT and SEQUENCE formula

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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] Index/Sort/Sequence with criteria
    By Maike in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-03-2022, 02:25 PM
  2. Replies: 5
    Last Post: 01-21-2021, 07:41 PM
  3. [SOLVED] sort out the trades in sequence
    By deezina07 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 01-21-2021, 06:45 AM
  4. Replies: 1
    Last Post: 08-17-2019, 01:11 PM
  5. [SOLVED] SUMPRODUCT formula to ignor #NA
    By Macfool in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-20-2017, 10:11 AM
  6. Use Xldown to find cell, but ignor Formula in cells
    By t0m46 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-27-2010, 07:46 AM
  7. special sort sequence
    By fwalden in forum Excel General
    Replies: 4
    Last Post: 10-10-2006, 10:15 AM

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