+ Reply to Thread
Results 1 to 8 of 8

How to convert every text in a column to zero when summed?

  1. #1
    Registered User
    Join Date
    08-01-2014
    Location
    Nowhere in particular
    MS-Off Ver
    MSO2010
    Posts
    15

    How to convert every text in a column to zero when summed?

    Ediit:

    I'm so sorry, I just realized my question was totally wrong.
    It supposed to be how to get the total value without coming out with an error?
    Total Value B3+B7

    Suppose we're involving lots of data that contains texts and numbers and sums.

    ----

    Hi, please advise me what is the proper way to do this.
    Basically so that the all the texts are read as zero so as to avoid error.


    A B
    1 value A -
    2 Value B -
    3 Sum 1 Sum B1:B2
    4
    5 Value C -
    6 Value D 100
    7 Sum 2 Sum B5:B6
    8
    9 Total Vakue B3+B7
    Last edited by molosser; 04-22-2024 at 06:49 PM. Reason: Wrong questiion

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,889

    Re: How to convert every text in a column to zero when summed?

    The built in SUM() function already ignores text, so I would expect to use =SUM(B1:B2) and =SUM(B5:B6) in B3 and B7. =B3+B7 or =SUM(B3,B7) should have no trouble summing those two results in B9.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    08-01-2014
    Location
    Nowhere in particular
    MS-Off Ver
    MSO2010
    Posts
    15

    Re: How to convert every text in a column to zero when summed?

    Quote Originally Posted by MrShorty View Post
    The built in SUM() function already ignores text, so I would expect to use =SUM(B1:B2) and =SUM(B5:B6) in B3 and B7. =B3+B7 or =SUM(B3,B7) should have no trouble summing those two results in B9.
    I'm so sorry, I just realized my question was totally wrong.
    It supposed to be how to get the total value without coming out with an error?
    Total Value B3+B7

    Suppose we're involving lots of data that contains texts and numbers and sums.
    Last edited by molosser; 04-22-2024 at 05:39 PM.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,889

    Re: How to convert every text in a column to zero when summed?

    Do you have an example data set where you get an error with those functions? Based on the limited information given, I would say to avoid use of the + operator, since the + operator doesn't know how to cope with text, but the SUM() function has no trouble ignoring text.

  5. #5
    Registered User
    Join Date
    08-01-2014
    Location
    Nowhere in particular
    MS-Off Ver
    MSO2010
    Posts
    15

    Re: How to convert every text in a column to zero when summed?

    Quote Originally Posted by MrShorty View Post
    Do you have an example data set where you get an error with those functions? Based on the limited information given, I would say to avoid use of the + operator, since the + operator doesn't know how to cope with text, but the SUM() function has no trouble ignoring text.
    I don't have an example data set with me at the moment it's similar to the data in OP.
    Suppose there are many Sums: Sum 1, Sum 2, Sum 3 etc.

    The formula =SUM(B3,B7) works perfectly.
    But =B3+B7 comes out #VALUE!

    But just to cover my base.
    What if Total value is Sum 1 - Sum 2, or Sum 1 x Sum 2, or Sum 1 : Sum 2?
    What are the appropriate formulas for these?

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,299

    Re: How to convert every text in a column to zero when summed?

    Please upload a sample excel file, complete with expected answers... calculated manually.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  7. #7
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,889

    Re: How to convert every text in a column to zero when summed?

    I'm still not sure exactly what you are trying to do. A few more thoughts:

    Are you required to put the intermediate summary values in column B? I usually find that I prefer to have the intermediate summary values in their own column. I would generally prefer =SUM(B1:B2) etc. in column C. C3=SUM(B1:B2), C7=SUM(B5:B6) and so on. Then my final total formula can be =SUM(C1:C100) (or whatever range is needed). If one of the subtotals is supposed to be subtracted rather than added in the final total, subtract it in it's cell =-SUM(B5:B6).

    For multiplication and division, use the PRODUCT() function, in the same manner.

    Is that helpful?

  8. #8
    Registered User
    Join Date
    08-01-2014
    Location
    Nowhere in particular
    MS-Off Ver
    MSO2010
    Posts
    15

    Re: How to convert every text in a column to zero when summed?

    Quote Originally Posted by MrShorty View Post
    I'm still not sure exactly what you are trying to do. A few more thoughts:

    Are you required to put the intermediate summary values in column B? I usually find that I prefer to have the intermediate summary values in their own column. I would generally prefer =SUM(B1:B2) etc. in column C. C3=SUM(B1:B2), C7=SUM(B5:B6) and so on. Then my final total formula can be =SUM(C1:C100) (or whatever range is needed). If one of the subtotals is supposed to be subtracted rather than added in the final total, subtract it in it's cell =-SUM(B5:B6).

    For multiplication and division, use the PRODUCT() function, in the same manner.

    Is that helpful?
    Yes, it's very helpful.
    Thank you very much for the kind help, problem 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. [SOLVED] Is there a way to ensure all numbers in a column are summed?
    By Curious Dude in forum Excel General
    Replies: 5
    Last Post: 03-23-2017, 05:00 PM
  2. Replies: 8
    Last Post: 11-11-2016, 09:46 AM
  3. Replies: 4
    Last Post: 05-07-2015, 02:56 PM
  4. Can a Range of AlphanUmeric Text values be Summed?
    By e4excel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-27-2013, 09:28 PM
  5. [SOLVED] Adding a column of summed Rows to the right of the last filled column...
    By Zoediak in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-09-2013, 11:58 AM
  6. filtering a summed column
    By SRussell in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-03-2008, 05:12 PM
  7. Multiply One Column Times Another Summed by Row
    By Mkren911 in forum Excel General
    Replies: 1
    Last Post: 03-03-2005, 08:24 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