+ Reply to Thread
Results 1 to 4 of 4

Getting the sum of values after removing text

  1. #1
    Forum Contributor
    Join Date
    06-21-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    179

    Getting the sum of values after removing text

    Gurus,

    I was wondering if I can create a single formula that gets the sum of column of only the values that contain a specific text.

    I will have cells that will contain the value "100 *". I want to strip the " *" from that value to get 100. I have created a new column to strip the " *" from the value but I was wondering if there is a way to do that and get the sum in a single formula.

    please see my example document. In the yellow cell, I am looking for a formula that will total the two values that contain " *" which would $200.00

    TIA,
    Tim
    Attached Files Attached Files
    Last edited by TimlmiT; 04-10-2021 at 11:11 AM.

  2. #2
    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,869

    Re: Getting the sum

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do with a bit more detail.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    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.

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Getting the sum of values after removing text

    Please try

    for all sum
    =SUMPRODUCT(--TEXT(SUBSTITUTE(C2:C16,"*",),"0.00;;0;\0"))

    for *

    =SUMPRODUCT(--TEXT(SUBSTITUTE(C2:C16,"*",),"0.00;;0;\0"))-SUM(C2:C16)
    or
    =SUMPRODUCT(--TEXT(SUBSTITUTE(TEXT(C2:C16,"\0;;0"),"*",),"0.00;;0;\0"))
    Attached Files Attached Files
    Last edited by Bo_Ry; 04-10-2021 at 11:21 AM.

  4. #4
    Forum Contributor
    Join Date
    06-21-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    179

    Re: Getting the sum of values after removing text

    wow.. works perfectly! I really gave it zero chance of there being a solution.

    Thanks a million for responding!!

+ 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