+ Reply to Thread
Results 1 to 12 of 12

How to add numbers with text (i.e. units) mixed with numbers without text?

  1. #1
    Registered User
    Join Date
    05-05-2016
    Location
    uk
    MS-Off Ver
    13
    Posts
    16

    How to add numbers with text (i.e. units) mixed with numbers without text?

    Hi I have the following data:

    table1.PNG

    Basically I want to be able to select the entire column for both sums. The first one only adds up numbers without text, and the second only adds numbers with text. Is this doable? Or do I need to do more data cleaning?

    Thanks!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: How to add numbers with text (i.e. units) mixed with numbers without text?

    Is it always just the letter "e"? Or is it always just one letter, any letter? Or could there be combinations of several letters?
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    05-05-2016
    Location
    uk
    MS-Off Ver
    13
    Posts
    16
    Quote Originally Posted by TMS View Post
    Is it always just the letter "e"? Or is it always just one letter, any letter? Or could there be combinations of several letters?
    Could be any letter

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: How to add numbers with text (i.e. units) mixed with numbers without text?

    Any single letter?

  5. #5
    Registered User
    Join Date
    05-05-2016
    Location
    uk
    MS-Off Ver
    13
    Posts
    16

    Re: How to add numbers with text (i.e. units) mixed with numbers without text?

    yups it has to be a single letter, but i guess to make it easy (not really fussed with number of letters), as long as we can add the ones with letters and without i am happy.
    Last edited by leepox; 04-07-2017 at 05:09 AM.

  6. #6
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,911

    Re: How to add numbers with text (i.e. units) mixed with numbers without text?

    Maybe?

    =SUM(IF(ISTEXT(B1:B6),--RIGHT(B1:B6,LEN(B1:B6)-1)))

    Enter with Ctrl+Shift+Enter.

  7. #7
    Registered User
    Join Date
    05-05-2016
    Location
    uk
    MS-Off Ver
    13
    Posts
    16

    Re: How to add numbers with text (i.e. units) mixed with numbers without text?

    It comes up with a #value error

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,848

    Re: How to add numbers with text (i.e. units) mixed with numbers without text?

    Did you enter it as an array formula? CTRL+SHIFT+ENTER, and not just ENTER?

    Actually, you'll need this:

    =SUM(B1:B6)+SUM(IF(ISTEXT(B1:B6),--RIGHT(B1:B6,LEN(B1:B6)-1)))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  9. #9
    Registered User
    Join Date
    05-05-2016
    Location
    uk
    MS-Off Ver
    13
    Posts
    16

    Re: How to add numbers with text (i.e. units) mixed with numbers without text?

    Thanks a bunch for some reason it only works when the text is before the numberr i.e. i6 but does not work if it is 6i. Really weird, but thank you I have got this working now!

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: How to add numbers with text (i.e. units) mixed with numbers without text?

    That's because your sample data indicated a character on the left so the number part is taken from the right hand side ...

  11. #11
    Registered User
    Join Date
    05-05-2016
    Location
    uk
    MS-Off Ver
    13
    Posts
    16

    Re: How to add numbers with text (i.e. units) mixed with numbers without text?

    D'oh. I'm an idiot

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,848

    Re: How to add numbers with text (i.e. units) mixed with numbers without text?

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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] Sorting Mixed Text and Numbers
    By snapfade in forum Excel General
    Replies: 15
    Last Post: 08-29-2019, 01:23 PM
  2. Vlookup with mixed numbers and text error #value!
    By calyan1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-01-2016, 11:31 AM
  3. text mixed in with numbers in pivot table columns.
    By td3201 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 08-24-2012, 12:54 PM
  4. Separating text and numbers from a mixed code
    By amahesh101 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-10-2010, 03:42 AM
  5. AutoFill mixed text and numbers
    By fandangle in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 12-01-2007, 09:13 AM
  6. Summation of cells with mixed numbers & text
    By HTWingNut in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-31-2007, 10:31 AM
  7. Incrementing Mixed text & numbers
    By Janet T in forum Excel General
    Replies: 8
    Last Post: 11-08-2005, 09:02 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