+ Reply to Thread
Results 1 to 7 of 7

Finding first non-zero value in a column and then return all values (non-zero&zero)

  1. #1
    Registered User
    Join Date
    06-20-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2011 Mac
    Posts
    4

    Finding first non-zero value in a column and then return all values (non-zero&zero)

    Hi,

    I have a problem which I do not know how to solve. I am trying to find a formula which returns the first non-zero value in a column as well as all other values in that column (both non-zero and zero values). The point is to skip all the zero values in the start of the column, and then return all values as they are after skipping the first zero values (if there are any). I would like to extract these values to a new column with the desired values to start on the top. As of now I have just seen formulas returning first non-zero value but then stops. I have also managed to return all non-zero values.. But this does not solve my problem...

    Thank you in advance!

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Finding first non-zero value in a column and then return all values (non-zero&zero)

    Hi and welcome to the forum.

    .
    .. As of now I have just seen formulas returning first non-zero value but then stops. I have also managed to return all non-zero values.. But this does not solve my problem...
    So, what is your problem?

    I suggest you to upload a small sample workbook and show us, how your data looks like now and how you want to be.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    06-20-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2011 Mac
    Posts
    4

    Re: Finding first non-zero value in a column and then return all values (non-zero&zero)

    Thank you for your fast reply! I will attach my worksheet.

    returning data.xlsx

  4. #4
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Finding first non-zero value in a column and then return all values (non-zero&zero)

    Hi If You will not find proper function try to use such code
    Please Login or Register  to view this content.
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  5. #5
    Registered User
    Join Date
    06-20-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2011 Mac
    Posts
    4

    Re: Finding first non-zero value in a column and then return all values (non-zero&zero)

    Thank you very much Tom! The code worked perfectly. But I have one more question. Can you help med design the exact similar code only substituting the zero´s with blank cells? Thank you! Attached you will find the worksheet showing how I want it to look like.

    Marius

    returning data.xlsx

  6. #6
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Finding first non-zero value in a column and then return all values (non-zero&zero)

    Hi For this You do not need any macro simple select empty cells in first rows and delete them

  7. #7
    Registered User
    Join Date
    06-20-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2011 Mac
    Posts
    4

    Re: Finding first non-zero value in a column and then return all values (non-zero&zero)

    Thanks Tom! Appreciate it!

+ 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