+ Reply to Thread
Results 1 to 5 of 5

list all non blank cells

  1. #1
    Registered User
    Join Date
    07-28-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    15

    list all non blank cells

    I have a list of values that are a result of a formula and there are blank cells within the list. How can I create a new list that display it one after another combining the entire list.

    I have tried this

    Please Login or Register  to view this content.
    Though I am pulling the data from another sheet and so it fails, even when I change it.

    Thanks

  2. #2
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: list all non blank cells

    Try this:

    This will remove blanks and move to the top all values in a range.
    Enter as array formula. (CTRL+SHIFT+ENTER), not just enter. Enter into your desired cell, and copy down.


    "breaks" is a named range. In your case, $d$2:$d$20. name the range.


    =IF(ROWS($1:1)<=COUNTA(breaks),INDEX(breaks,SMALL(IF(breaks<>"",ROW(breaks)-MIN(ROW(breaks))+1),ROWS($1:1))),"")
    Pete
    Last edited by PeteABC123; 07-30-2015 at 12:56 PM.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: list all non blank cells

    Perhaps apply filters, and filter out all the blanks?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    07-28-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    15

    Re: list all non blank cells

    It comes up with "#NAME?" is this field. The reason being is the range that I want combined have formulas in, so I am guessing that it's saying that these fields aren't blank even though nothing is being shown due to the formula that I have in there.

    However, the code you gave does work when I copy values only into a new sheet.

    Unless you know of a way that can resolve this?

  5. #5
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: list all non blank cells

    Try this, also an array formula: breaks is a named range. Enter it in W2.
    Please Login or Register  to view this content.
    Pete
    Last edited by PeteABC123; 07-31-2015 at 02:23 PM. Reason: corrected code

+ 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. How do I compile a list of non-blank cells?
    By Exothermix in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-09-2015, 06:26 PM
  2. VBA: Copy non-blank and paste to separate sheet ONLY blank cells (running list)
    By brolsen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2014, 03:34 PM
  3. [SOLVED] autofill vertical list horizontally with 2 blank cells in-between each list item
    By Phily915 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-14-2014, 08:15 PM
  4. Convert Matrix to List (excluding blank cells from list)
    By cameron.rumball in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-02-2013, 12:35 AM
  5. [SOLVED] Remove blank cells from the list
    By ABSTRAKTUS in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-30-2012, 01:51 PM
  6. Skipping blank cells in a list to create an uninterrupted list
    By bdance in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-02-2007, 06:26 PM
  7. [SOLVED] Validation List Box:-blank cells in my list range
    By SMBR in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-09-2005, 09:11 AM

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