+ Reply to Thread
Results 1 to 6 of 6

Formula for adding numbers in brackets to the overall total

  1. #1
    Registered User
    Join Date
    05-18-2015
    Location
    N.ireland
    MS-Off Ver
    2010
    Posts
    3

    Formula for adding numbers in brackets to the overall total

    Hi there

    We are a junior football team and are wanting to add player appearances into an excel spreadsheet like below.

    Player. League (sub). Cup (sub). Total
    Goalkeeper. 1(2). 2(1). 6

    How can I add the numbers in the brackets as well as the numbers with no brackets into our totals.

    Thanks in advance.

  2. #2
    Registered User
    Join Date
    05-18-2015
    Location
    N.ireland
    MS-Off Ver
    2010
    Posts
    3

    Re: Formula for adding numbers in brackets to the overall total

    Total is supposed to be 6, wouldn't let me type in the format to help explain.

  3. #3
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Formula for adding numbers in brackets to the overall total

    This would be very easy if you just format the sheet a little differently.

    Make separate columns for "League", "League Sub", "Cup", "Cup Sub". Then can put a =SUM() formula in the totals column. Otherwise parsing that all out in the format you have it is going to be a pain.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula for adding numbers in brackets to the overall total

    Quote Originally Posted by Welders1 View Post

    Player. League (sub). Cup (sub). Total
    Goalkeeper. 1(2). 2(1). 6
    Why are there periods/decimal points in there?

    You should not do this! Put each piece of information in its own cell.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    05-18-2015
    Location
    N.ireland
    MS-Off Ver
    2010
    Posts
    3

    Re: Formula for adding numbers in brackets to the overall total

    Thank you.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula for adding numbers in brackets to the overall total

    Just for the heck of it...

    Data Range
    A
    B
    C
    D
    1
    Player
    League (sub)
    Cup (sub)
    Total
    2
    Goalkeeper
    1(2)
    2(1)
    6


    This formula entered in D2:

    =SUMPRODUCT(--MID(SUBSTITUTE(SUBSTITUTE(B2&C2,")",0),"(",0),ROW(INDIRECT("1:"&LEN(B2&C2))),1))

    However, I still recommend:

    You should not do this! Put each piece of information in its own cell.


    EDIT: It should be noted that this only works on single digit numbers!
    Last edited by Tony Valko; 05-18-2015 at 05:41 PM.

+ 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] 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
  2. Need formula to remove brackets from string of numbers
    By happycats in forum Excel General
    Replies: 7
    Last Post: 07-11-2012, 09:19 PM
  3. Replies: 5
    Last Post: 04-19-2012, 09:02 AM
  4. Replies: 8
    Last Post: 11-14-2011, 07:45 PM
  5. Adding numbers within a total
    By michaelas in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-27-2008, 04:51 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