+ Reply to Thread
Results 1 to 7 of 7

How to eliminate zeros in a row

  1. #1
    Registered User
    Join Date
    09-14-2012
    Location
    U.S.
    MS-Off Ver
    Excel 2007
    Posts
    14

    How to eliminate zeros in a row

    Hi there-

    I created a formulation and it does the calculation and assign numbers to column A, B, C, D, E, F, G, H, I, J.


    ----A---B---C---D---E---F---G---H---I---J
    R1--1---0---0---0---0---0---0---0---0---0
    R2--0---3---0---0---0---0---0---0---0---0
    R3--0---0---0---0---4---0---0---0---0---0
    R4--0---0---0---0---0---0---0---1---0---0
    R5--0---0---0---0---0---0---0---0---0---6

    This is how table looks like. Every row only has 1 number and the rest is always 0. I am trying to create a formulation to capture the only value in the row. So I will have another Column which will be called FINAL COLUMN, This Column will display the only value in the row. So for R1, it will be 1 or for R5, it will be 6. I cannot use sum because the number has spaces in front of them and I really need these spaces for my database formulation. So is there any way to capture this number with it's spaces. So there will be no change for the value.
    Last edited by vademo0o; 05-21-2013 at 02:25 PM.

  2. #2
    Registered User
    Join Date
    09-14-2012
    Location
    U.S.
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: How to eliminate zeros in a row

    i JUST SOLVED IT WITH A VERY BASIC FORMULATION SO THANKS. I ALSO POST THE ANSWER

    =IF(C2>0,C2,IF(D2>0,D2,IF(E2>0,E2,IF(F2>0,F2,IF(G2>0,G2,IF(H2>0,H2,IF(I2,I2,IF(J2>0,J2))))))))

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,454

    Re: How to eliminate zeros in a row

    Perhaps a little shorter = SUM(A1:J1) and pull down as needed

  4. #4
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,324

    Re: How to eliminate zeros in a row

    or =max(A1:J1)
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  5. #5
    Registered User
    Join Date
    05-21-2013
    Location
    Providence, RI
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: How to eliminate zeros in a row

    =SUM(TRIM(A1)+TRIM(B1)+TRIM(C1)+TRIM(D1)+TRIM(E1)+TRIM(F1)+TRIM(G1)+TRIM(H1)+TRIM(I1)+TRIM(J1)) would eliminate the space problem and focus in on the numbers.

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,454

    Re: How to eliminate zeros in a row

    Quote Originally Posted by popipipo View Post
    or =max(A1:J1)
    Supposing all numbers are >0, yes

  7. #7
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,324

    Re: How to eliminate zeros in a row

    Look at #2:
    i JUST SOLVED IT WITH A VERY BASIC FORMULATION SO THANKS. I ALSO POST THE ANSWER

    =IF(C2>0,C2,IF(D2>0,D2,IF(E2>0,E2,IF(F2>0,F2,IF(G2>0,G2,IF(H2>0,H2,IF(I2,I2,IF(J2>0,J2))))))))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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