Forum Discussion

Mark Akesson's avatar
Mark Akesson
Copper Contributor
Apr 05, 2018

SUM Function Not Working

I have a spreadsheet that I created a nested if statement to fill in a number value in  cell J2 "=IF(G2="L","0",IF(G2="OTL","1",IF(G2="W","2",IF(G2="",""))))"  it works fine and puts the proper number in J2.  It does this for cells G2:G83.  The number value goes into cells J2:J83.  I then used the SUM function to total the numbers in cells J2:J83 however, the sum shows as 0 instead of the actual sum.  What if anything am I missing? 

6 Replies

  • Lee_A_W's avatar
    Lee_A_W
    Copper Contributor

    I entered =SUM(E3:E9) but all it shows is 0

     

    The correct cells are addressed

    No ‘ mark
    No space ahead of number
    All cells are formatted as number (both source and destination) using FORMAT function.
    There is a small triangle in upper LH side of source cells but I cannot figure what it means or how to find out.
    • SergeiBaklan's avatar
      SergeiBaklan
      Diamond Contributor

      Small triangle means you have a text, not numbers. If you select your cells and click on arrow within the appeared icon you'll see like

      You may convert to numbers from that menu, cells format will be shifted to General. Before that you may check how you cells are formatted, select them and click Ctrl+1.

      • TeresaHan's avatar
        TeresaHan
        Copper Contributor

        SergeiBaklan 

         

        Hi there - I have a similar problem as your previous poster, but have checked my cells and no text fields there, but I still get $0 for the sub-total.  I've done this many times and no problem, but just can't seem to pinpoint where the issue is.  I've put a red box around the culprit - hope you can help.

        Regards,

        Teresa

  • Detlef_Lewin's avatar
    Detlef_Lewin
    Silver Contributor

    Mark

     

    "1" is text and not a number. SUM() adds only numbers and ignores text. Change "1" to 1,

    • Mark Akesson's avatar
      Mark Akesson
      Copper Contributor

      Thanks, that did it.  I knew I was missing some stupid little obvious thing.

Resources