+ Reply to Thread
Results 1 to 3 of 3

Finding the first cell in a range that does not match a value

  1. #1
    Registered User
    Join Date
    05-05-2016
    Location
    uk
    MS-Off Ver
    13
    Posts
    16

    Finding the first cell in a range that does not match a value

    Hi all, I want to find the first cell that does not match a certain value.

    For example I have this data:


    First non
    blank
    value First non-
    matching
    value Column
    Reference Data 1 Data 2 Data 3 Data 4 Data 5
    AA AB 4 AA AA AB AA


    The first 3 columns are the results. The rest of the columns are data. I have the following equation in Cell A2:

    =INDEX(D5:FC5, MATCH("*", D5:I5, 0))

    This returns the first non-blank text data and I use this as the reference value. The equation I require is for cell B2 which is to find the first non AA value. To makes matters more complex, the BLANK cells do not count as a change. So I guess the 2 questions are:

    1. How to find the first cell that does not match the reference value, and
    2. How do I ignore the blank cells to find the first non-match value.

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Finding the first cell in a range that does not match a value

    Try this one

    =INDEX(D5:FC5, MATCH(TRUE,IF(D5:FC5<>"",D5:FC5<>"aa"),0))

    Must be confirmed as an Array formula by pressing Shift Ctrl Enter, otherwise you will get #N/A!

  3. #3
    Registered User
    Join Date
    05-05-2016
    Location
    uk
    MS-Off Ver
    13
    Posts
    16

    Re: Finding the first cell in a range that does not match a value

    This actually works! Thank you ever so much!

+ 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. Finding value from a range and if not match then find next
    By annux3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2015, 08:44 AM
  2. Excel 2013, finding match in cell from range (column)
    By Rob de QUartel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2014, 05:58 AM
  3. [SOLVED] Finding MIN value within range and returning MATCH
    By MaddyG in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-16-2012, 03:50 PM
  4. Replies: 0
    Last Post: 07-11-2012, 11:06 AM
  5. Finding the closest match between two columns within a given range.
    By cfletcher in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-11-2012, 10:37 AM
  6. Range match finding
    By calsexceladel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2008, 08:42 PM
  7. [SOLVED] Finding a cell match then deleting a row.
    By Tim M in forum Excel General
    Replies: 2
    Last Post: 05-18-2006, 12:10 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