+ Reply to Thread
Results 1 to 9 of 9

how do I put 2 separate sums into 1 cell?

  1. #1
    bugmenot
    Guest

    how do I put 2 separate sums into 1 cell?

    Hi all,

    I have a listing of numbers in different catagories such as the following:

    Type A:
    1

    Type B:
    2


    Type C:
    4

    Total:
    7

    I want to be able to have a cell automatically calculate to say:
    Type A:
    "(1/7)"

    Type B:
    "(2/7)"

    Type C:
    "(4/7)"

    with that exact formating.

    Any advise?
    Last edited by bugmenot; 02-02-2009 at 05:25 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: how do I put 2 separate sums into 1 cell?

    A1 = 1
    B1 = 2
    C1 = 4
    D1 = 7 (the formula =SUM(A1:C1)

    To have a cell show multiple info, you could try something like:

    A2 ="("&A1&"/"&SUM(A1:C1)&")"
    or
    ="("&A1&"/"&D1&")"

    Either results in (1/7)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: how do I put 2 separate sums into 1 cell?

    Assuming your original is in A1:A12 and "Type A" is in C1, then in C2:

    ="("&INDEX($A$1:$A$12,MATCH(C1,$A$1:$A$12,0)+1)&"/"&$A$12&")"

    Is that what you need?

    copy and paste to other cells as appropriate
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: how do I put 2 separate sums into 1 cell?

    ="("&A1&"/"&SUM(A1,A3,A5)&")" for example
    thats 3 anyone going to make it four

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: how do I put 2 separate sums into 1 cell?

    I'm sorry, I just realized you might have wanted those quotes to appear as well. If so:

    ="""("&A1&"/"&SUM(A1:C1)&")"""

    or

    ="""("&A1&"/"&D1&")"""

  6. #6
    bugmenot
    Guest

    Re: how do I put 2 separate sums into 1 cell?

    Thanks! That works great!

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: how do I put 2 separate sums into 1 cell?

    Nice to know which one worked for you.. we may have all had different understandings of your data layout, etc...

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: how do I put 2 separate sums into 1 cell?

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: how do I put 2 separate sums into 1 cell?

    jb wins the prize!!!!!!!!!

+ 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