+ Reply to Thread
Results 1 to 5 of 5

Eliminating blank cell from a list

  1. #1
    Registered User
    Join Date
    11-18-2009
    Location
    Selangor, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    21

    Eliminating blank cell from a list

    Hi everybody. I'm new here.

    I would like to seek help and guidance from members of this forum. Actually, I am working on an excel project whereby I have a list of numbers e.g :

    1 0 12 25 0 55 0 0 6 7

    I need excel to auto re-arrange the numbers to exclude the number 0 (zero/ blank cell) so that the result will looks like this :

    1 12 25 55 6 7

    May I know what is the formula/function should I use to get this result?

    Appreciate members here to help me.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Eliminating blank cell from a list

    The quickest way is probably to sort the data and then copy the data or delete the zeros.

    EDIT: do you need to preserve the original order? And are they zeros or blanks or both?
    Last edited by StephenR; 11-18-2009 at 01:14 PM.

  3. #3
    Registered User
    Join Date
    11-18-2009
    Location
    Selangor, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Eliminating blank cell from a list

    Thanks for the response. Actually the set of numbers were derived from calculation by excel formula that linked to each cell. In this case, the list of numbers generated are 1 0 12 25 0 55 0 0 6 7 (zero only. not a blank cell).

    The reason I mention blank cell is because I have found an answer to similar a scenario at this link http://www.cpearson.com/excel/noblanks.htm

    In that case, it refers to list of texts while my problem is referring to set of numbers. Adding to that, I really don't know how to use the code given.

    Really appreciate assistance from you guys.

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Eliminating blank cell from a list

    Instead of checking for vbNullString, you check for 0. What about just sorting the data though?

  5. #5
    Registered User
    Join Date
    11-18-2009
    Location
    Selangor, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Eliminating blank cell from a list

    Thanks for the advice.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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