+ Reply to Thread
Results 1 to 8 of 8

summarizing multiple sheets

  1. #1
    Registered User
    Join Date
    10-04-2007
    Posts
    15

    summarizing multiple sheets

    Hi

    I've got myself all confused on what to do.

    I have a workbook, with lots of sheets all named after employees, I want to create a paysheet to send to my payroll company.

    I have created a list of all sheets, and would like to create a formula, to look at the name in the cell, go to that named sheet and come back with a value from 1 specified cell.

    I've tried pivot table but cannot work out how to get different info from multiple pages, most of the formulas want to look at arrays, my head is hurting.

    If anyone can help then please let me know. I can always attach the form I have created for people to have a look at.

    Thanks

    MickeyP

  2. #2
    Forum Contributor wmorrison49's Avatar
    Join Date
    09-25-2007
    Posts
    267
    Why don't you attach the file and I will take a look at it. Also, please include some specifics as to what you want to go where and just a step by step process of what you are looking for.

  3. #3
    Registered User
    Join Date
    10-04-2007
    Posts
    15
    Hi

    Thanks for looking, I have put a little message box on the last tab. I hope you can help. This is a reduced version as I had 72 tabs before.
    Attached Files Attached Files

  4. #4
    Forum Contributor wmorrison49's Avatar
    Join Date
    09-25-2007
    Posts
    267
    I think I can do this. I need a little help though, since I am not familiar with your spreadsheet. You requested Employee #, Rate of Pay, Contract Hours, Total Hours worked, Total Holiday, Total Sick, Total Absence, and Bank Holiday. Can you tell me which cells each of these can be found in on the employee sheets? That would make sure that I am pulling the right data. Thx

  5. #5
    Registered User
    Join Date
    10-04-2007
    Posts
    15
    Employee Number: C9
    Rate of Pay: D6
    Contract hours: M8
    Total Hours worked:Column Q
    Holidays:Column T
    Sick Pay: Column V
    Absence:Column X
    Bank Holiday: Column y


    thanks

  6. #6
    Forum Contributor wmorrison49's Avatar
    Join Date
    09-25-2007
    Posts
    267
    Alright, try running this macro and see if it works for you. It was a little hard to tell if it was working completely because the workbook you attached is mostly zeroes and blanks, but I think it is doing what it is supposed to. Give it a try and please let me know if it worked or not.

    Public Sub RetrieveData()
    Dim EmployeeName As String
    Dim EmployeeNumber As String
    Dim RateofPay As String
    Dim ContractHours As String
    Dim Week As String
    Dim TotalHoursWorked As String
    Dim Holidays As String
    Dim SickPay As String
    Dim Absence As String
    Dim BankHoliday As String
    Sheets("Ceridian").Activate
    Week = Range("B4")
    Range("A9").Select
    Do Until ActiveCell = ""
    EmployeeName = ActiveCell
    Sheets(EmployeeName).Activate
    EmployeeNumber = Range("C9")
    RateofPay = Range("D6")
    ContractHours = Range("M8")
    Range("A15").Select
    Do Until ActiveCell = ""
    If ActiveCell = Week Then
    TotalHoursWorked = ActiveCell.Offset(0, 16)
    Holidays = ActiveCell.Offset(0, 19)
    SickPay = ActiveCell.Offset(0, 21)
    Absence = ActiveCell.Offset(0, 23)
    BankHoliday = ActiveCell.Offset(0, 24)
    Exit Do
    Else
    ActiveCell.Offset(1, 0).Select
    End If
    Loop
    Sheets("Ceridian").Activate
    ActiveCell.Offset(0, 1) = EmployeeNumer
    ActiveCell.Offset(0, 2) = RateofPay
    ActiveCell.Offset(0, 3) = ContractHours
    ActiveCell.Offset(0, 4) = TotalHoursWorked
    ActiveCell.Offset(0, 5) = Holidays
    ActiveCell.Offset(0, 6) = SickPay
    ActiveCell.Offset(0, 7) = Absence
    ActiveCell.Offset(0, 8) = BankHoliday
    ActiveCell.Offset(1, 0).Select
    Loop

    End Sub
    Also, the employee names on the sheet "Ceridian" must be the names of the sheets EXACTLY. I noticed there were asterisks by the names of the employees on the Ceridian sheet and I got rid of those. Otherwise it won't be able to match them up, so you will want to delete those.
    Hope it works!
    Last edited by wmorrison49; 10-04-2007 at 10:26 AM.

  7. #7
    Registered User
    Join Date
    10-04-2007
    Posts
    15
    Hi

    WOW, thanks a lot this seems to do what I needed, will keep you updated to my progress as I mess around with it.

    Genius.

  8. #8
    Forum Contributor wmorrison49's Avatar
    Join Date
    09-25-2007
    Posts
    267
    Glad it worked for you. Let me know if any problems come up.

+ 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