+ Reply to Thread
Results 1 to 5 of 5

Index match problem omitting rows with no data.

  1. #1
    Registered User
    Join Date
    08-23-2021
    Location
    New England
    MS-Off Ver
    Office 2021 Professional
    Posts
    16

    Index match problem omitting rows with no data.

    Having Index - Match problems when a list of rows has 0 values.
    VLookup has the same issues.
    I've greatly simplified the actual formula.
    I've looked at other posts but just can't get the concept.


    Goal: Return value for this row # 5


    Array

    1 46
    2 56
    3 78
    4 3
    5 11
    6 25
    7 56
    0
    0
    0
    0

    If I cheat and only consider the correct rows I get the right answer with this formula. INDEX(A1:B7,MATCH(5,A1:A7,0),2) = 11
    In practice, i need to have extra rows.


    My feeble attempt at a formula:

    INDEX(A1:B11,MATCH(5,INDEX((A1:A11<>0)*(A1:A11),0),2) = #REF

    Please help.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,432

    Re: Index match problem omitting rows with no data.

    Try this:

    INDEX(A1:B11,MATCH(1,(A1:A11<>0)*(A1:A11),0),2)

    You may need to enter it as an array formula (C+S+E).
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,148

    Re: Index match problem omitting rows with no data.

    This works

    =INDEX(A1:B100,MATCH(5,A1:A100,0),2)

    or have I mis-understood ???
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Registered User
    Join Date
    08-23-2021
    Location
    New England
    MS-Off Ver
    Office 2021 Professional
    Posts
    16

    Re: Index match problem omitting rows with no data.

    I don't think so. I did a lot of searching and rows with zeros screw the whole thing up. I tested the issue by eliminating the problematic rows and the formula you suggest - the one I originally used as well - worked. Unfortunately I need to provide space for additional future data. I'm going to try the moderator's suggestion and hope that the (C+S+E) step has to be only performed once. MSFT needs to improve this issue. Unfortunately, it sometimes takes them years to get a Round TUIT.

  5. #5
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,408

    Re: Index match problem omitting rows with no data.

    In my Excel and according to theory and practice, John's formula works well.
    This is in contrast to the VLOOKUP.

    The formula can be simplified to:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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. Using INDEX and MATCH but omitting some results
    By DrPopo in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-30-2020, 02:29 AM
  2. Vlookup and Index Match Problem with Data Validation
    By Irish15 in forum Excel General
    Replies: 10
    Last Post: 04-08-2020, 06:22 AM
  3. Match Index problem with 2 sets of data to search through
    By cincinnati_kid in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-10-2019, 03:42 PM
  4. Macro to Match, Copy Row Data and Paste in a Column omitting blanks with ComboBox
    By Paul103 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-21-2015, 01:19 PM
  5. [SOLVED] INDEX/MATCH problem when looking up data with various prefixes (letters and numbers)...
    By bcd-at-work in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-23-2014, 08:18 PM
  6. Vlookup and Index/Match problem with multiple rows
    By excelismyfriend in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-01-2009, 12:25 PM
  7. In Excel my autofilter? is omitting some data rows from output
    By Perplexed Jeff in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-05-2005, 09:05 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