+ Reply to Thread
Results 1 to 9 of 9

How to sum row with single cell containing numbers and text

  1. #1
    Registered User
    Join Date
    03-30-2017
    Location
    California, United States
    MS-Off Ver
    Excel Online
    Posts
    3

    How to sum row with single cell containing numbers and text

    Hello all,

    I'm having difficulty adding up a row and a column with cells containing both numbers and text.
    Here's an example:


    Capture.PNG

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: How to sum row with single cell containing numbers and text

    Hi, welcome to the forum

    It is always better to upload a sample workbook, rather than a pic, we cant work with images.

    Having said that, see if this will get you started - you will need to apply this for each cell, then add them together...
    A
    B
    9
    1 aaa, 2 bbb, 3 ccc
    6
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

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

    Re: How to sum row with single cell containing numbers and text

    One possible way, using VBA (paste the code into a module).

    The syntax for the USF is =SumNumbers(A1). Copy down.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Then add them up as normal.
    Attached Files Attached Files
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: How to sum row with single cell containing numbers and text

    Quote Originally Posted by FDibbins View Post
    Hi, welcome to the forum

    It is always better to upload a sample workbook, rather than a pic, we cant work with images.

    Having said that, see if this will get you started - you will need to apply this for each cell, then add them together...
    A
    B
    9
    1 aaa, 2 bbb, 3 ccc
    6
    ooooops forgot to add the formula duh...
    B9=SUMPRODUCT(LEN(A9)-LEN(SUBSTITUTE(A9,{1,2,3,4,5,6,7,8,9},"")),{1,2,3,4,5,6,7,8,9})

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

    Re: How to sum row with single cell containing numbers and text

    Another thing... What is the range of numbers used? Are they always single digits (or at least always the same number of digits) - or do they vary widely????

  6. #6
    Registered User
    Join Date
    03-30-2017
    Location
    California, United States
    MS-Off Ver
    Excel Online
    Posts
    3

    Re: How to sum row with single cell containing numbers and text

    Thanks for the speedy reply! They will always be only 1 digit numbers.

  7. #7
    Registered User
    Join Date
    03-30-2017
    Location
    California, United States
    MS-Off Ver
    Excel Online
    Posts
    3

    Re: How to sum row with single cell containing numbers and text

    Thank you!

    It works perfectly! But is there anyway that I could add rows/columns that contains similar cells like that?
    Sorry if I'm being nitpicky lol

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

    Re: How to sum row with single cell containing numbers and text

    Who are you talking to???

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: How to sum row with single cell containing numbers and text

    Quote Originally Posted by merck25 View Post
    Thank you!

    It works perfectly! But is there anyway that I could add rows/columns that contains similar cells like that?
    Sorry if I'm being nitpicky lol
    Can you provide an example?

+ 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] Count the numbers within a string of numbers in a single cell
    By gra0001 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-26-2016, 05:08 AM
  2. SUM numbers from a single cell based on preceding text
    By richardj in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-26-2016, 11:24 AM
  3. [SOLVED] arrange text and numbers separately in a single cell
    By nadimqaisar in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-25-2015, 06:43 PM
  4. Replies: 11
    Last Post: 10-16-2013, 10:21 PM
  5. Split numbers and text from a single Cell
    By wong_lizzie in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-17-2012, 08:12 AM
  6. Replies: 5
    Last Post: 01-17-2012, 12:50 PM
  7. Replies: 2
    Last Post: 08-16-2011, 09:03 AM

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