+ Reply to Thread
Results 1 to 9 of 9

Add cells together that have a certain name associated with them.

  1. #1
    Registered User
    Join Date
    10-29-2013
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    16

    Add cells together that have a certain name associated with them.

    Hi all forum and excel newbie here,

    I am hoping someone is able to solve this as it will make my job a whole lot quicker,

    I have a spread sheet that has info auto populated to it, what i need to do is add up some figures for certain names.

    for example in coloumn N are the numbers i need to add but the name i need to get a total for is in column I, to add to my problem some times the amount of rowscontaining the name could be 5 and sometimes it could be 4 etc.

    Soooo (no laughing at my example please)

    if cell I2 contains the name Karl then take the number from Cell N2 then if the cell I3 contains the name Karl then add Cell N2 to N3 -
    if Cell I4 contains the name Karl then take the nunmber from Cell N4 and add it to N2 and N3 BUT if the name is not Karl just add N2 and N3 then start the same for the next name in Cell N4

    Excel help.xlsx


    Many Thanks

    Karl.
    Last edited by Drunknmonkie; 11-05-2013 at 11:32 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Add cells together that have a certain name associated with them.

    Hi and welcome to the forum

    (I think you have a few references out, N is empty, so I assumed M - adjust as needed)

    If you want to show a column of totals, for each person, use this, copied down...
    =SUMIF($I$2:$I$27,I2,$M$2:$M$27)

    If you only want to show the total once, next to the 1st appearance of the name, use this, copied down...
    =IF(I2=I1,"",SUMIF($I$2:$I$27,I2,$M$2:$M$27))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    10-29-2013
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Add cells together that have a certain name associated with them.

    Hi FDibbins and thank you for the reply, that code is great thanks a lot :D

    I have updated the file as i missed a column!

    With the code is it possable to search it for the name? so the first part of the code would be looking at Renae and when it finds the last Renae it would then add all her numbers in N together and then print the total to the cell, and then it will find the next name and print thier total to the next cell and so on

    I am asking a lot i know but i am very greatful for any help on this.... very greatful

    Many thanks

    karl.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Add cells together that have a certain name associated with them.

    If you mean you want the total to appear on the last row of that name, and all other occurrences above to be empty/blank, then try this...

    O2=IF(I2=I3,"",SUMIF($I$2:$I$27,I2,$M$2:$M$27))

    My other formula above was doing it the other way round - putting the total against the 1st occurrence of the name and leaving the others blank
    N2==IF(I2=I1,"",SUMIF($I$2:$I$27,I2,$M$2:$M$27))
    M
    N
    O
    1
    Hours Charged 1st entry last entry
    2
    25.74
    64.7162
    3
    1.11
    4
    33.27
    5
    4.60
    64.7162

  5. #5
    Registered User
    Join Date
    10-29-2013
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Add cells together that have a certain name associated with them.

    Hi FDibbins,

    Thank you again for replying - I dont think i am explaining what i am trying to do properly sorry.

    Basicly i am looking for something that will check the whole of column N and find all the different names and write them to cells below the data. (sorry i dont know how to add a table here)

    Example

    Renae
    Matt
    Karl


    Then the total from these names (found in column N) put next to the name.

    Renae | 2500
    Matt | 3980
    Karl | 2789


    The only constant will be the name, but there will be a differing amount of times that name appears in the data.

    Hope this makes sense

    Thank you

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Add cells together that have a certain name associated with them.

    Actually I kinda figured that was what you wanted, but then I thought you wanted the totals inthe main table. Take a look at the attached and see if that is what yoiu want?
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-29-2013
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Add cells together that have a certain name associated with them.

    THAT IS AWESOME!!

    How do you do that?? :D :D

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Add cells together that have a certain name associated with them.

    you'r welcome.

    the 1st formula pulls out the unique names (formula courtesy of 1 of the other senior members)
    the next set are pretty much just what I showed you above, just put into a table

    If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below my 1st post to you)

  9. #9
    Registered User
    Join Date
    10-29-2013
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Add cells together that have a certain name associated with them.

    Thanks FDibbins! that code is great!

    Can i ask you for something else as well

    i have uploaded the spreadsheet i am working from so you can see what i am trying to do with me making a mess of explaining it,

    Excel help 2.xlsx

    In the sheet 2 i have a run rate this is where i need to put the total sell figures from the first sheet.

    Thought this would be easy but again the name column in sheet 2 will change on a daily basis - as in the position of the name so it kinda needs to read column A for the name then find that name in sheet 1 and get its total sell value and then put that in sheet 2 under run rate.

    I appreciate all your help and patience

    I clicked your little star yesterday also if you can post the name of the other contributor i will click their little star too

+ 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. combining many cells in one cells keeping character font and hyperlinks of all cells
    By mankind00 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-27-2012, 09:41 AM
  2. Replies: 4
    Last Post: 06-17-2011, 08:53 AM
  3. Formula: Drop Down List -> Choose Option Finds Cells & Replace Cells with Cells
    By g00glethis1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-14-2010, 01:10 PM
  4. Replies: 2
    Last Post: 06-24-2010, 04:53 PM
  5. Replies: 0
    Last Post: 09-06-2005, 02:05 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