+ Reply to Thread
Results 1 to 17 of 17

Sum number(s) from part of cell value

  1. #1
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Sum number(s) from part of cell value

    Learned people I have a spreadsheet of data downloaded from an order form in Jotform. In certain cells there is a value such as Tomato Red Alert [1]

    What I would like to do is 'Sum' the numeric values from each cell at the bottom of the column

    I have deleted the [] and then used the RIGHT function as an experiment/test but I would have to do this in almost every column which would be very time consuming

    many thanks in advance for your kind assistance

    Peter

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Sum number(s) from part of cell value

    Try this (untested):

    =SUM(IFERROR(VALUE(SUBSTITUTE(SUBSTITUTE(A1:A5000,"*[",""),"]","")),""))
    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 Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,650

    Re: Sum number(s) from part of cell value

    One of possible approaches would be using Text to columns (found on Data ribbon in Data tools group). Select column, choose separated values set [ as separator and mark first column as "not import". Then either do the same for ] or just Find&replace ] with nothing
    Best Regards,

    Kaper

  4. #4
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Sum number(s) from part of cell value

    Hi Ali that returns 0....thank you for your reply

  5. #5
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Sum number(s) from part of cell value

    Many thanks will give that a try

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,650

    Re: Sum number(s) from part of cell value

    As for formula solution (tested) try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Sum number(s) from part of cell value

    Thank you will try that a little later

  8. #8
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Sum number(s) from part of cell value

    Quote Originally Posted by Kaper View Post
    As for formula solution (tested) try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Ok given that a try works for one column but not if I copy it to other columns am attaching an extract of the full spreadsheet and also a screendump with an error message for your kind attentionplantsalesformuale.jpg
    Attached Files Attached Files
    Last edited by WAULKMILLFH; 01-13-2021 at 08:54 AM.

  9. #9
    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,139

    Re: Sum number(s) from part of cell value

    Yes it will. read the yellow banner, top of page.
    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

  10. #10
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Sum number(s) from part of cell value

    Many thanks Glenn!!

  11. #11
    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,139

    Re: Sum number(s) from part of cell value

    One way (of many!!):


    =SUM(IFERROR(-MID(SUBSTITUTE(SUBSTITUTE(B2:B29,"[","("),"]",")"),FIND("(",SUBSTITUTE(SUBSTITUTE(B2:B29,"[","("),"]",")")),20),0))
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Sum number(s) from part of cell value

    Glenn you are a star man!! Thank you so much works perfectly

  13. #13
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,650

    Re: Sum number(s) from part of cell value

    If you want to use it in the same column where it is written you cvannot reference whole column, so in A33 for instance:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and copy right.

    As a side effect - it _could_ work somewhat quicker than whole-columns referrencing formula

  14. #14
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Sum number(s) from part of cell value

    Yes thank you very much that works fine also!!

  15. #15
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,650

    Re: Sum number(s) from part of cell value

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

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  16. #16
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Sum number(s) from part of cell value

    Alternative formula, but non-array, normally Enter:

    B33, add up to 6 digit number inside []:

    Please Login or Register  to view this content.
    Quang PT

  17. #17
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Sum number(s) from part of cell value

    Excellent many 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. Replies: 6
    Last Post: 03-11-2019, 05:06 AM
  2. [SOLVED] Enter part nrs consist....it display part number needed
    By ricklou in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2017, 07:16 AM
  3. Help returning part number 1 time and adding up like part number QTY
    By SOLERSA in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-16-2014, 06:31 AM
  4. [SOLVED] Hide part number in a cell
    By seanobrathvilly in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-31-2014, 06:25 PM
  5. Find Part number through Macro and output to associated part to certain cell
    By boylers75 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2012, 04:32 PM
  6. [SOLVED] extracting a part of a number from one cell to another
    By sverre123 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-10-2012, 10:00 AM
  7. Using part of a number in another cell
    By UBERMASS in forum Excel General
    Replies: 2
    Last Post: 11-17-2007, 05:44 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