+ Reply to Thread
Results 1 to 17 of 17

Look for unique info in one column, show sum from multiple tabs / columns

  1. #1
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    884

    Look for unique info in one column, show sum from multiple tabs / columns

    Ok, so the title is a tad cyrptic!!

    Workbook is a time sheet for 14 departments(i created it and all aspects of it in my own time at home so the sheet is mine)
    Layout is identical on each tab.
    )olumn B in each sheet contains employee name for that area (ranging from B9:B70)
    Column Y in each sheet displays total hours worked for that area (ranging from Y9:Y70)

    I would like another 'Summary' sheet that would look at column B (range B9:B70) on every sheet, and then show me all unique names (so no duplicate names) in one column, in another column i would like the same thing, but this time a sum of all hours worked for that name, taken as a sum from all the sheets where the name appears.
    I also do not know if this would be better being done via macro??

    Sample attached, notes are made on 'Summary Tab'
    Kind Regards.
    galvinpaddy
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Look for unique info in one column, show sum from multiple tabs / columns

    Can you use a pivot table with multiple input ranges?

  3. #3
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    884

    Re: Look for unique info in one column, show sum from multiple tabs / columns

    i am afraid i have no idea, i have almost no experience with Pivot tables

  4. #4
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    884

    Re: Look for unique info in one column, show sum from multiple tabs / columns

    If someone wouldnt midn giving me an example on the pivot tables that would be appreciated

  5. #5
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Look for unique info in one column, show sum from multiple tabs / columns

    Hi, galvinpaddy
    try it
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    884

    Re: Look for unique info in one column, show sum from multiple tabs / columns

    That, is, brilliant.

    Spot on with what i was after, very much appreciated fella!! thank-you very much indeed!

    Some well earned rep heading your way!

  7. #7
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    884

    Re: Look for unique info in one column, show sum from multiple tabs / columns

    Apologies Nilem,

    With your code, is it possible to limit the amount of sheets it takes data from? for example if the workbook contains 15 but i only want to take data from 12.

    Kindest Regards

  8. #8
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Look for unique info in one column, show sum from multiple tabs / columns

    then try so
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    884

    Re: Look for unique info in one column, show sum from multiple tabs / columns

    Good morning Nilem,

    In the attached (taken from post 5) I have added 2 more columns into the Summary tab (G = Sat & H = Sun)
    Is it possible for you to modify your code so that the summary sheet shows:

    Column B shows full total of hours (Mon-Sun)
    Columns C:F doing what the already do, showing hours worked in an area mon-fri
    Columns G:H showing me hours worked over weekends (a total of both days, doesn’t need to be split up per area)

    Massive thanks for the work already done, and thanks in advance for the above.

    Kind regards, galvinpaddy
    Attached Files Attached Files

  10. #10
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Look for unique info in one column, show sum from multiple tabs / columns

    Hi Galvinpaddy,
    see attachment
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    884

    Re: Look for unique info in one column, show sum from multiple tabs / columns

    Good monring Nilem,

    When i copy the code to my active worksheet (with correct info etc) and run i receive a runtime error '13' type mismatch, with the following line in yellow
    Please Login or Register  to view this content.

  12. #12
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Look for unique info in one column, show sum from multiple tabs / columns

    Hi Galvinpaddy (we have already noon)
    Can you show this "...my active worksheet (with correct info etc)..."

  13. #13
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    884

    Re: Look for unique info in one column, show sum from multiple tabs / columns

    Hi Nilem,

    Apologies for the delay, had to remove all conditional formats and cell colours to reduce file size

    All formulas have been replaced with values also, but the data is set out exactly as it is entered.

    Kind regards
    Attached Files Attached Files

  14. #14
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Look for unique info in one column, show sum from multiple tabs / columns

    Error occurs because the macro loops through all the sheets in the workbook. All you need is some sheets to calculate the time. What are these sheets?

  15. #15
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    884

    Re: Look for unique info in one column, show sum from multiple tabs / columns

    Hi Nilem,

    Im not sure i understand, sorry

    The times are in each of the sheets in Column Y (column X contains the figure but in HH:MM format, & Y is the numeric value)
    The last code you provided on your sheet worked great, thats the result i would liek to see, but reading data from all of the tabs on my WC document.

  16. #16
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Look for unique info in one column, show sum from multiple tabs / columns

    try
    Please Login or Register  to view this content.

  17. #17
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    884

    Re: Look for unique info in one column, show sum from multiple tabs / columns

    OK.

    Now solved i believe, Nilem, you are indeed a god send!!! thank-you very much indeed for your help, very much appreciated!!
    Kind regards

    galvinpaddy

+ 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