+ Reply to Thread
Results 1 to 10 of 10

Ignore Blank Values While Using INDEX

  1. #1
    Registered User
    Join Date
    04-05-2014
    Location
    TN
    MS-Off Ver
    Excel 2003
    Posts
    7

    Ignore Blank Values While Using INDEX

    I have found several answers to this, but I haven't had much luck with most of the solutions I've seen, usually revolving around IFBLANK. I feel like I am probably just not getting it - sorry!

    I have this formula:
    Please Login or Register  to view this content.
    The intent is for it to scan Q2:Q546 to create a unique list in U2:U547.

    Q2:Q546 is a work column that pulls text values from other sheets in the workbook via simple cell references.

    The problem is, in the reference cells (and thus Q2:Q546), there are a lot of blank cells, and the first blank always inserts a '0' or blank cell into the list, located at the place the first blank cell happens. It would be preferable to not have this blank cell (or, alternatively, just sort the blank cell to the bottom?)

    Like I said, my fault, the answer is here on the forums, I am just not grokking it - any help is appreciated as always!
    Last edited by jokorey; 04-08-2014 at 01:18 PM.

  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: Ignore Blank Values While Using INDEX

    Try this array formula**:

    =INDEX($Q$2:$Q$546,MATCH(0,IF($Q$2:$Q$546<>"",COUNTIF($U$1:U1,$Q$2:$Q$546)),0))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    04-05-2014
    Location
    TN
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Ignore Blank Values While Using INDEX

    Thank you Tony - that doesn't do what I am looking for, but I think it did help me figure out the question I need to ask!

    I've attached an example if anyone would like to see, but I can also explain it much clearer now I think

    Since Column Q is made up of referenced values, when there is a blank in the source data, column Q returns a 0 value when it is referenced itself, and it is this 0 value I would like to not show up in the indexed list.

    Jokorey EG.xlsx

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Ignore Blank Values While Using INDEX

    The following array formula extracts distinct values and not blanks
    Please Login or Register  to view this content.
    pS replace the semi-colons with commas if necessary
    Last edited by Pepe Le Mokko; 04-08-2014 at 11:13 AM.

  5. #5
    Registered User
    Join Date
    04-05-2014
    Location
    TN
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Ignore Blank Values While Using INDEX

    Thank you Pepe.

    Unfortunately, this didn't work either - example in work attached.

    Jokorey EG 2.xlsx

    I would be curious if anyone has a solution to this problem for the future, but I am going to mark this as solved, because I just realized the KISS solution in my current situation...put a "0" value in cell U1, which the index checks but isn't in use in any other way. /smackself.

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

    Re: Ignore Blank Values While Using INDEX

    Which sample file more accurately demonstrates what you want to do?

    Jokorey EG.xlsx

    Jokorey EG 2.xlsx

  7. #7
    Registered User
    Join Date
    04-05-2014
    Location
    TN
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Ignore Blank Values While Using INDEX

    Both should be the same, but jokorey EG2 should be a little bit easier to check out.

  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: Ignore Blank Values While Using INDEX

    Ok, can you reference the original data rather than the referenced data?

    Or, if using the referenced data, is 0 an otherwise valid result? Maybe we can just exclude 0 entries?

    In the sample file there are #N/A errors when all uniques have been extracted. I assume you'll want to "hide" those?

  9. #9
    Registered User
    Join Date
    04-05-2014
    Location
    TN
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Ignore Blank Values While Using INDEX

    I can't reference the original data, sadly - it is too scattered through the workbook.

    I may have gotten turned around - I thought I was excluding zeros, and it was an odd problem with referencing a null value. I really need to work on my comprehension.

    In the actual sheet, I have the formula wrapped in IFERROR.

  10. #10
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Ignore Blank Values While Using INDEX

    Just replace <>"" to <>0 in Tony's formula
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

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

    Re: Ignore Blank Values While Using INDEX

    Ok, this gets rid of the 0 result:

    =IFERROR(INDEX($Q$2:$Q$546,MATCH(0,IF($Q$2:$Q$546<>0,COUNTIF($U$1:U1,$Q$2:$Q$546)),0)),"")

    Array entered.

+ 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] Ignore If Blank & check multiple cells for equal values
    By Urugmo88 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-25-2013, 04:46 AM
  2. [SOLVED] An INDEX MATCH formula has blank cell - need to ignore or delete
    By rls231 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-26-2013, 11:13 PM
  3. Replies: 4
    Last Post: 07-18-2012, 02:34 PM
  4. Line chart should ignore blank data values
    By kenelder in forum Excel General
    Replies: 2
    Last Post: 06-10-2011, 03:50 AM
  5. Array Function - ignore blank values
    By gillemi in forum Excel General
    Replies: 6
    Last Post: 06-13-2006, 04:10 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