+ Reply to Thread
Results 1 to 3 of 3

Row indexing formula to only display non-blank cell values

  1. #1
    Registered User
    Join Date
    10-17-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    71

    Row indexing formula to only display non-blank cell values

    In range B4:M4 some cells contain values and some are blank. I am trying to write a formula that will omit the blank values and just give me the nonblank values. The code below returns the FIRST nonblank value, but I can't seem to figure out how to drag it across a row to get the others. I want to ensure that the numbers stay in the same order (so no largest/smallest formulas), but the blank cell values need to be removed.

    This would then need to be repeated for (B5:M5, B6:M6, ETC).


    Please Login or Register  to view this content.
    Any help in modifying my formula above would be much appreciated!

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Row indexing formula to only display non-blank cell values

    Try the following Arrayed formula*

    =INDEX($B4:$M4,SMALL(IF($B4:$M4<>"", COLUMN($B4:$M4)-1),COLUMNS($A$1:A$1)))

    This will not change your order. I am assuming your new list will also be in a single row across columns

    *...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    10-17-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    71

    Re: Row indexing formula to only display non-blank cell values

    Thanks for the quick reply, your formula worked perfectly! I kept messing with the COLUMN(S) formula(s), but I just couldn't make it happen.

+ 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] Sum formula ignore display cell blank
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-30-2014, 07:24 PM
  2. Replies: 4
    Last Post: 03-17-2006, 04:30 PM
  3. [SOLVED] Can a formula display output to an otherwise blank cell?
    By T.Morris-TX in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-29-2005, 08:35 AM
  4. display negative values as a blank cell in Excel
    By pherozeb in forum Excel General
    Replies: 4
    Last Post: 01-05-2005, 01:06 AM
  5. display negative values as a blank cell in Excel
    By Pheroze Bharucha in forum Excel General
    Replies: 1
    Last Post: 01-04-2005, 07:23 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