+ Reply to Thread
Results 1 to 4 of 4

Compile data by unique criteria

  1. #1
    Registered User
    Join Date
    08-09-2010
    Location
    Berkshires, Massachusetts
    MS-Off Ver
    Excel 2007
    Posts
    2

    Compile data by unique criteria

    I've created a spreadsheet that itemizes employee payroll and class codes. I would like to compile the total payroll for each class code on a separate worksheet. For ex:

    sheet 1
    EMPLOYEE CODE PAYROLL
    DAVIS, LOREEN 9107 $41,000
    FISHER, JOHN 8047 $66,000
    JONES, DIANE 8810 $32,000
    RYAN, GARY 9107 $28,000
    SMITH, JOE 8810 $27,000
    WOODS, KAREN 8047 $52,000

    sheet 2
    CODE PAYROLL
    8810 $59,000
    9107 $69,000
    8047 $118,000

    I know how to reference another worksheet, but not sure how to compile all payroll from a unique class code into a separate line of data.

    Any ideas?

    Thank you,

    Heather

  2. #2
    Forum Contributor
    Join Date
    05-16-2010
    Location
    UK
    MS-Off Ver
    2003 and 2007
    Posts
    252

    Re: Compile data by unique criteria

    You could use a pivot table. Please see attached.

    EDIT:
    I have assumed that the Payroll data is formatted with the $ currency and is not text.
    Attached Files Attached Files
    Last edited by pb71; 08-09-2010 at 05:52 PM.

  3. #3
    Registered User
    Join Date
    08-09-2010
    Location
    Berkshires, Massachusetts
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Compile data by unique criteria

    Thank you for your help with this. I can't figure out how the pivot table is pulling data from the Data worksheet. When I change the values in the Data worksheet, the pivot table values do not change, and I can't find any formulas associated with the Pivot Table data fields.

    I'll have to read up on Pivot Tables, I've never used one. But thanks for pointing me in the right direction.

  4. #4
    Forum Contributor
    Join Date
    05-16-2010
    Location
    UK
    MS-Off Ver
    2003 and 2007
    Posts
    252

    Re: Compile data by unique criteria

    If you change data in the data source, then you will need to refresh the pivot table to reflect the changes. This could be automated with VBA (using a Worksheet_Change or Worksheet_Activate event, for example, if required).

    I have attached a new workbook with some notes on creating and updating the pivot table. I have also made use of a dynamic named range which will accommodate additions to the pivot table data source.

    A useful link:
    http://peltiertech.com/Excel/Pivots/pivotstart.htm
    Attached Files Attached Files

+ 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