+ Reply to Thread
Results 1 to 9 of 9

Adding values in brackets

  1. #1
    Forum Contributor
    Join Date
    03-02-2018
    Location
    england
    MS-Off Ver
    2016
    Posts
    156

    Adding values in brackets

    Hi,

    In a column I've values like below.
    Please Login or Register  to view this content.
    What I want to achieve is to add the values in the brackets in column T like below,
    Please Login or Register  to view this content.
    Thanks

  2. #2
    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: Adding values in brackets

    So... is your expected result 354, or the string 15+56+103+90+45+45 ???
    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

  3. #3
    Forum Contributor
    Join Date
    03-02-2018
    Location
    england
    MS-Off Ver
    2016
    Posts
    156

    Re: Adding values in brackets

    @Glenn Kennedy

    The expected values I want in column T would be the string 15+56+103+90+45+45

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

    Re: Adding values in brackets

    Assume that data is at A1

    Not sure you will like this but, please try B1 drag to the right

    =IFERROR(REPLACE(A1,FIND("(",A1),FIND(")",A1)-FIND("(",A1)+1,SUMPRODUCT(--MID(SUBSTITUTE(MID(A1,FIND("(",A1)+1,FIND(")",A1)-FIND("(",A1)-1),"+"," "),{1,5},5))),"")

  5. #5
    Forum Contributor
    Join Date
    03-02-2018
    Location
    england
    MS-Off Ver
    2016
    Posts
    156

    Re: Adding values in brackets

    @Bo_Ry

    I've try your formula but I can't seem to get it to work.

    When you said B1 drag to the right do you mean down instead?
    Attached Files Attached Files

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

    Re: Adding values in brackets

    HXIO,

    Your files is a lot more complex than you Post#1,

    Please see attached,
    This method require many helper columns. I have to shift final result to columns U.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    03-02-2018
    Location
    england
    MS-Off Ver
    2016
    Posts
    156

    Re: Adding values in brackets

    @Bo_Ry

    Thanks for the help care for an explanation of the formula on how it works if possible?

    Thanks

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Adding values in brackets

    UDF?

    A
    B
    C
    1
    Input
    Output
    2
    17+(11+78+38)+(74+74)+(54+78)+66+33 17+127+148+132+66+33 B2: =Debracket(A2)
    3
    17+66+107+108+50+17+8 17+66+107+108+50+17+8
    4
    15+26+57+54+43+37+8 15+26+57+54+43+37+8
    5
    27+53+(72+34)+(72+33)+77+27+14 27+53+106+105+77+27+14
    6
    33+(84+15)+79+50+33+16+16 33+99+79+50+33+16+16
    7
    10+20+30+37+37+20+10 10+20+30+37+37+20+10
    8
    10+23+45+55+23+10+10 10+23+45+55+23+10+10
    9
    22+22+86+88+66+44+22 22+22+86+88+66+44+22
    10
    120+136 120+136
    11
    22+66+(64+66)+(64+24)+44+44+22 22+66+130+88+44+44+22
    12
    (44+18)+(38+38+38+16)+(36+36+36+23)+(24+36+36+36)+(32+18)+17 62+130+131+132+50+17
    13
    27+(30+30+22)+(30+30+30+30+15)+(30+30+30+30+17)+(30+24)+27 27+82+135+137+54+27
    14
    31+(41+37+23)+(66+66+11)+(66+66+13)+(15+60)+19+10 31+101+143+145+75+19+10
    15
    54+96+(102+54)+(78+84)+84+42+30 54+96+156+162+84+42+30


    Please Login or Register  to view this content.
    Last edited by shg; 10-22-2018 at 07:27 PM.
    Entia non sunt multiplicanda sine necessitate

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

    Re: Adding values in brackets

    I would use shg's UDF.

    Formula is too complicate, find brackets, extract text in brackets, separate text in brackets with "+" and sumproduct # in brackets then replace it back to brackets, and this only for first set of brackets. Next column is for 2nd set of brackets and so on.

+ 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] adding together Vlookup answers in a longer formulae, Brackets issue maybe
    By Johny_0342 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-19-2018, 09:40 PM
  2. Summing brackets, when you have multiple brackets per cell
    By tmiller1002 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-26-2017, 11:22 AM
  3. Formula for adding numbers in brackets to the overall total
    By Welders1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-18-2015, 05:35 PM
  4. [SOLVED] Inserting formula using vba is adding unwanted brackets
    By strud in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-06-2014, 07:45 AM
  5. Replies: 0
    Last Post: 05-25-2012, 08:52 AM
  6. Replies: 5
    Last Post: 04-19-2012, 09:02 AM
  7. Replies: 8
    Last Post: 11-14-2011, 07:45 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