+ Reply to Thread
Results 1 to 10 of 10

Extracting and Calculating types of leave per department

Hybrid View

  1. #1
    Registered User
    Join Date
    11-09-2008
    Location
    South Africa
    Posts
    14

    Extracting and Calculating types of leave per department

    Good day all,

    This one has me busted. I need to calculate how many days of each different leave type have been taken for each Cost Code within an Excel 2003 spreadsheet. What adds to the problem is that the data extracted from our system comes to +/- than 50 000 lines. So doing this manually is out of the question.

    I have attached a spreadsheet containing an extract of the information (DATA Tab) to better understand. Under the Summary Tab I have the format in which the information must be presented. For each Cost Code/Department I need to calculate how many e.g. Annual Leave/Sick Leave/Other Leave etc. was processed for each month from January to end of October.

    Has anyone dealt with something similar? I would really appreciate any assistance as this problem is way above my Excel skills (not that it’s actually above average in any case... ;-) )

    Thanks in advance.
    R
    Attached Files Attached Files
    Last edited by NBVC; 11-25-2009 at 09:56 AM.

  2. #2
    Valued Forum Contributor Rahul Nagar's Avatar
    Join Date
    09-18-2008
    Location
    nasik
    MS-Off Ver
    Excel 2003
    Posts
    465

    Re: Extracting and Calculating types of leave per department

    Hello,

    I think you can you pivot table for the same.

    Regards
    Rahul

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

    Re: Extracting and Calculating types of leave per department

    How about a Pivot Table per attached.

    Note:

    Added a formula in Data sheet column G to extract codes from table above:

    =INDEX($C$2:$C$10,IF(ISNUMBER(MATCH(F14,$D$2:$D$10,0)),MATCH(F14,$D$2:$D$10,0),MATCH(LEFT(F14,FIND(" ",F14)-1),$D$2:$D$10,0)))
    Attached Files Attached Files
    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
    Registered User
    Join Date
    11-09-2008
    Location
    South Africa
    Posts
    14

    Re: Extracting and Calculating types of leave per department

    Quote Originally Posted by NBVC View Post
    How about a Pivot Table per attached.

    Note:

    Added a formula in Data sheet column G to extract codes from table above:

    =INDEX($C$2:$C$10,IF(ISNUMBER(MATCH(F14,$D$2:$D$10,0)),MATCH(F14,$D$2:$D$10,0),MATCH(LEFT(F14,FIND(" ",F14)-1),$D$2:$D$10,0)))
    excellent! although I'm a bit confused irt why there are multiples of certain months. How can we get the totals for each month per Cost Code, per Leave Type? Remember there's more than 50,000 lines of actual data...

    Kind regards,
    R

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

    Re: Extracting and Calculating types of leave per department

    I left out a step....

    ...right click the the Date captured column and select Group and Show Detail and then Group and then select Months... click Ok... all is better.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    11-09-2008
    Location
    South Africa
    Posts
    14

    Re: Extracting and Calculating types of leave per department

    Hi NBVC!

    Thanks for your kind assistance. Could you suggest a quick way to get the info in the format as per the Summary tab?

    Thanks again for your help!

    R

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

    Re: Extracting and Calculating types of leave per department

    What's wrong with the Pivot table...

    .. that is the closest and quickest way to handle that many records and separate them in to subgroups by Location3 or any other subgroup you choose.

    It is also more flexible as you can add delete data with a couple of clicks.

    An alternative is to use Sumproduct() formulas.. but will become extremely inefficient for that much data collection..

  8. #8
    Registered User
    Join Date
    11-09-2008
    Location
    South Africa
    Posts
    14

    Solved: Extracting and Calculating types of leave per department

    Yep! I see what you mean. Thanks again NBVC! Have a gr8 one!

    Regards,

    R

  9. #9
    Registered User
    Join Date
    11-09-2008
    Location
    South Africa
    Posts
    14

    Re: Extracting and Calculating types of leave per department

    My rating for this assistance.

    Regards,

    R

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

    Re: Extracting and Calculating types of leave per department

    Quote Originally Posted by Rennier View Post
    My rating for this assistance.

    Regards,

    R
    Not sure what this means

+ 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