+ Reply to Thread
Results 1 to 10 of 10

Recreating a new table removing all the 0's

  1. #1
    Registered User
    Join Date
    07-25-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    5

    Recreating a new table removing all the 0's

    Hi, My first post here so go easy on me

    Basically I have a basic table like the one below. Just say table starts at A1.

    Name Amount
    Mike 2
    John 10
    Alex 0
    Lucia 16
    Pam 0

    So using formula I would like to create a new table removing any people with a 0. I have a good look around but got nothing working so far.

    Any help would be much appreciated.

    Thanks

    Mike

  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: Recreating a new table removing all the 0's

    Try this...

    Data Range
    A
    B
    C
    D
    E
    1
    Name
    Amount
    ------
    Name
    Amount
    2
    Mike
    2
    Mike
    2
    3
    John
    10
    John
    10
    4
    Alex
    0
    Lucia
    16
    5
    Lucia
    16
    6
    Pam
    0
    7


    This array formula** entered in D2:

    =IFERROR(INDEX(A:A,SMALL(IF($B$2:$B$6<>0,ROW(B$2:B$6)),ROWS(D$2:D2))),"")

    ** 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.

    Copy across to E2 then down until you get blanks.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    07-25-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    5

    Re: Recreating a new table removing all the 0's

    Ok great, I forgot to metion im doing it in google sheets, does crtl shift and enter work on that?

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

    Re: Recreating a new table removing all the 0's

    I have no experience with Google spreadsheets.

  5. #5
    Registered User
    Join Date
    07-25-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    5

    Re: Recreating a new table removing all the 0's

    ok ill have a play, formulas work just the same in google sheets.

    What is the A:A bit after index, what is that referencing?

    Thanks for your quick replies by the way

  6. #6
    Registered User
    Join Date
    07-25-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    5

    Re: Recreating a new table removing all the 0's

    Also it works perfectly.

    Thanks you spent hours trying to do that

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Recreating a new table removing all the 0's

    and here is a code which does it on the orginal data.

    Please Login or Register  to view this content.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  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: Recreating a new table removing all the 0's

    Quote Originally Posted by mikehu View Post
    What is the A:A bit after index, what is that referencing?
    A:A is a reference to the entire column A.

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

    Re: Recreating a new table removing all the 0's

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

  10. #10
    Registered User
    Join Date
    07-25-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    5

    Re: Recreating a new table removing all the 0's

    Ah got you.

    In google sheets it didn't need the ctrl shift and enter it just worked.

    Once again thanks for your help. have marked as solved

+ 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. Recreating a macro... Sum up columns until blank row
    By zzimlich in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-29-2015, 12:42 PM
  2. Recreating a Graph with Two Column Description
    By Tytalus in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-12-2014, 03:53 AM
  3. Help recreating a table (advanced formula)
    By PC41 in forum Excel Charting & Pivots
    Replies: 9
    Last Post: 05-08-2014, 12:12 PM
  4. Recreating Technical Indicator in Excel
    By zealot in forum Excel General
    Replies: 1
    Last Post: 07-13-2012, 06:36 AM
  5. Recreating a table
    By laguna92651 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-06-2012, 10:32 PM
  6. Contemplating recreating workbook
    By blue9244 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2008, 08:57 PM
  7. [SOLVED] How do I change my DSN without recreating the odbc connection?
    By plato in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-17-2005, 01:06 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