+ Reply to Thread
Results 1 to 8 of 8

Sum of Columns if Values of one Column are the Same - For Large Spreadsheets

  1. #1
    Registered User
    Join Date
    04-15-2014
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    4

    Sum of Columns if Values of one Column are the Same - For Large Spreadsheets

    Hi there,

    I'm in need of a formula that can give me the sum of cells in a column if the values in another column are the same. For example:


    Col A
    John Smith
    John Smith
    John Smith
    Jane Doe
    Jane Doe
    Jane Doe

    Col B
    2
    8
    9
    3
    4
    6

    Col E
    Monday
    Tuesday
    Sunday
    Monday
    Wednesday
    Friday

    The total for John Smith would be 19 and the total for Jane Doe would be 13. The problem is that this file is huge and we will have to use this formula on a weekly basis with different values each week, so it would be very difficult to use a "specific" formula for each person. Is this a possibility?

    And to make it more difficult, I would then have to subtract one of those values if that row has a certain value in one of the other columns.

    If values in Column A are equal to each other, sum of Column B. (Column C would contain the sum in this case.)

    Column D = Column C minus B, if value of Column E is Sunday, otherwise don't subtract anything.

    The total for John Smith in Column D would be 10 and Jane's total for D would still be 13.



    I hope this makes sense and didn't confuse anyone out there. Please advise.

    Thanks!

    C.M.

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    1,075

    Re: Sum of Columns if Values of one Column are the Same - For Large Spreadsheets

    It would help if you could upload a copy of your workbook so we can test solutions without having to retype your data. Remember to remove/replace any sensitive information before uploading.
    Trish in Oz
    -------------
    A problem well defined is a puzzle half solved


    If you attach a sample of your workbook it will be easier to find a solution. Remember to remove/replace sensitive data before uploading the file. Look here if you need help with attachments:
    http://www.excelforum.com/faq.php?fa...b3_attachments

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Sum of Columns if Values of one Column are the Same - For Large Spreadsheets

    For the first part it is very easy to get the total for each person. You can use either SUMIF or SUMPRODUCT functions.
    But to get the total on the basis of weekly data, formula will depend on the sheet layout i.e. how do you arrange your data in the sheet.
    So to get the proper help from the forum, it would be better if you upload a sample workbook with a layout which is exactly same as your original workbook with enough sample data in it.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Registered User
    Join Date
    04-15-2014
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Sum of Columns if Values of one Column are the Same - For Large Spreadsheets

    How would I upload my file?

  5. #5
    Valued Forum Contributor
    Join Date
    02-09-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    1,075

    Re: Sum of Columns if Values of one Column are the Same - For Large Spreadsheets

    After you click Reply click Go Advanced. Below your reply window click on the button to Manage Attachments.

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Sum of Columns if Values of one Column are the Same - For Large Spreadsheets

    There are two ways to do this.......

    1) Click Edit (your first post) --> Go Advanced --> Click the paper clip icon just above the reply box (where you will type your reply) --> Add Files --> Browse --> Upload --> Done (on the bottom right of the window) --> Post

    2) While you reply to the thread, click on Go Advanced --> follow all the same steps as in 1.

  7. #7
    Registered User
    Join Date
    04-15-2014
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Sum of Columns if Values of one Column are the Same - For Large Spreadsheets

    test.xls

    I hope this works.

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Sum of Columns if Values of one Column are the Same - For Large Spreadsheets

    Hi C.M. and welcome to the forum,

    This looks like a very basic Pivot Table problem/answer to me. See the attached with some sample data and what I mean. Time to learn Pivot Tables?
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  9. #9
    Registered User
    Join Date
    04-15-2014
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Sum of Columns if Values of one Column are the Same - For Large Spreadsheets

    Quote Originally Posted by MarvinP View Post
    Hi C.M. and welcome to the forum,

    This looks like a very basic Pivot Table problem/answer to me. See the attached with some sample data and what I mean. Time to learn Pivot Tables?
    This would probably work, but the names sometimes change from week to week. It is for payroll purposes. Some weeks there will be 30 people and some weeks there might be over 100. Would this be something in which we would have go through and add or delete names as needed? Or would I be able to copy and paste whatever is needed to make a pivot table, into each excel file that is submitted to me? I'm not very good with Excel anymore. :/ Also, the reason why I need Sunday subtracted from the total is because it is paid at a different rate type, so it would be entered into my program separately. I would need one total with Sunday and one with everything but Sunday. Is this possible?

    Thank you for helping.

  10. #10
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Sum of Columns if Values of one Column are the Same - For Large Spreadsheets

    All your requirements are possible using Pivot Tables. They are very easy to make with 2010 Excel. Start learning how to work with them.

    http://www.addictivetips.com/windows...-pivot-tables/

    There are also LOTS of YouTube tutorials online about Pivots.

  11. #11
    Registered User
    Join Date
    04-15-2014
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Sum of Columns if Values of one Column are the Same - For Large Spreadsheets

    Quote Originally Posted by MarvinP View Post
    All your requirements are possible using Pivot Tables. They are very easy to make with 2010 Excel. Start learning how to work with them.

    http://www.addictivetips.com/windows...-pivot-tables/

    There are also LOTS of YouTube tutorials online about Pivots.
    Thank you so much. You are very helpful.

+ 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. Splitting data into seperate spreadsheets based on column values
    By narendrabr in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 02-03-2014, 07:16 AM
  2. [SOLVED] Formula to show the large/biggest of the last 50 values of a column
    By dualaudio454252 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-26-2013, 11:16 PM
  3. [SOLVED] Fill cells in one sheet one column with values from other spreadsheets matching 2 criteria
    By synses in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-15-2013, 08:34 AM
  4. Replies: 5
    Last Post: 04-09-2013, 05:29 PM
  5. [SOLVED] Chop Large Excel Column into Specific Number of Values in Multiple Columns
    By kheschmann in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-06-2013, 03:42 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