+ Reply to Thread
Results 1 to 15 of 15

Housekeeping payroll that pulls rows of information to different sheets

  1. #1
    Registered User
    Join Date
    03-04-2013
    Location
    US
    MS-Off Ver
    MS Office Home and Business 2010
    Posts
    7

    Housekeeping payroll that pulls rows of information to different sheets

    Hi everybody,

    I'm sorry if this question has been answered, but after a long search I've been unable to find a solution to my dilemma. Which is..

    I have a spreadsheet with four columns pertaining to the housekeepers payroll. The columns are (in this order): 'Units' 'Departure Dates' 'Team' 'Rates'.

    I'm trying to pull information from this sheet onto other sheets within the workbook based off of the cleaning team named in column 3 (Team). So, if for example, team AM had 14 cleans that week then they would have 14 rows associated with them. I would like all 14 of those rows to be pulled onto their payroll sheet. As it is now I have to copy and paste the cleans associated with each team on to the corresponding payroll sheet for that person. Could someone please help me figure out how to do this? If so, does anyone know how I could have those cells automatically insert themselves into the corresponding spreadsheet without altering the layout of the payroll sheet? Each sheet has a template established that I would like the information to insert itself within, regardless of how many rows of information need to be pulled.

    Thank you for reading!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Housekeeping payroll that pulls rows of information to different sheets

    If you add a "key" column formula to your database to add a unique numbered INDEX that relates to each sheet that row should go to, then it's easy to have the other sheets check that column and pull in the data based on the unique numbers.

    Click GO ADVANCED and use the paperclip icon to post up a copy of your workbook and I'll show you how. Make sure there is a good set of desensitized sample data. GO ahead and mockup on the payroll sheets some example rows as "results" if it's not patently obvious. Help us help you.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-04-2013
    Location
    US
    MS-Off Ver
    MS Office Home and Business 2010
    Posts
    7

    Re: Housekeeping payroll that pulls rows of information to different sheets

    Thanks for the help so far. Attached are examples of the main spreadsheet containing information for all cleaning teams, as well as one sheet that depicts where I would like all information pertaining to that team to go.

    forum payroll example..xlsx

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Housekeeping payroll that pulls rows of information to different sheets

    The one sheet added does not have the "mockup" of the information expected to appear on that sheet? "ANA" is on that sheet as an identifying code, but that code is not included in the data sheet.

  5. #5
    Registered User
    Join Date
    03-04-2013
    Location
    US
    MS-Off Ver
    MS Office Home and Business 2010
    Posts
    7

    Re: Housekeeping payroll that pulls rows of information to different sheets

    Humm. Maybe that is another element that should have been explained in my initial post. The sheet 'assignments' pulls information from our online database, where cleans are assigned to cleaning teams using abbreviations. Example: AM is Ana and Maria. So I would need for anything on the 'assignments' sheet to pull rows with AM in the third column over to both Ana and Maria's payroll sheets. From there the pay associated with the cleans are added up and divided in half- which I know how to do. It's just a matter of getting them to automatically go to Ana and Maria's sheets. I've modified the example so that it is hopefully clearer now. The third sheet, 'Example of what I'm trying for' shows what I would like the program to automatically return after the data is pasted into 'assignments'. I hope that helps clarify things- sorry for the confusion.

    forum payroll example 2.xlsx

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Housekeeping payroll that pulls rows of information to different sheets

    Ok, you will need to provide on the sheets the required Team Assignments, so I added that in column H. Just list the teams you want listed on each sheet in column H and they will be included.

    Also, since you have both static cells at the bottom and a dynamic number of rows to be copied in, I'm recommending you flip/flop your layout so the expanding stuff is at the bottom starting in row 10, now nothing below it to run into. The macro will clear everything from row 11 down and add new info each time it is run.

    Please Login or Register  to view this content.


    How/Where to install the macro:

    1. Open up your workbook
    2. Get into VB Editor (Press Alt+F11)
    3. Insert a new module (Insert > Module)
    4. Copy and Paste in your code (given above)
    5. Get out of VBA (Press Alt+Q)
    6. Save as a macro-enabled workbook

    The macro is installed and ready to use. Press Alt-F8 and select RateSheets from the macro list.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-04-2013
    Location
    US
    MS-Off Ver
    MS Office Home and Business 2010
    Posts
    7

    Re: Housekeeping payroll that pulls rows of information to different sheets

    Well I've no doubt gotten in way over my head. I pasted that code in and followed the steps provided. When I run the macro I get "Runtime error '1004'' No cells were found. I've tried interpreting the code to see what adjustments might need to be made but I'm not having any luck.

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Housekeeping payroll that pulls rows of information to different sheets

    Did you remember to add the Team Assignments in column H of each person's sheet like in the sample above?

  9. #9
    Registered User
    Join Date
    03-04-2013
    Location
    US
    MS-Off Ver
    MS Office Home and Business 2010
    Posts
    7

    Re: Housekeeping payroll that pulls rows of information to different sheets

    Yeah I did that. I also made sure that the name of the spreadsheet 'assignments' corresponds correctly with the way it is spelled out in your code.

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Housekeeping payroll that pulls rows of information to different sheets

    Time to check your work, post the workbook where you've applied all this, make sure the macro is installed in it as well, I'll check it out.

  11. #11
    Registered User
    Join Date
    03-04-2013
    Location
    US
    MS-Off Ver
    MS Office Home and Business 2010
    Posts
    7

    Re: Housekeeping payroll that pulls rows of information to different sheets

    Sorry for the delay- thanks for taking a look!

    PAYROLL MASTER (created 1.27.13).xlsm

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Housekeeping payroll that pulls rows of information to different sheets

    Well, since the whole point was to copy "cleaning assignment" to the other sheets, and "cleaning assignments" is a blank sheet, can't imagine it working. Also, you've add a bunch of other sheets, so you'll need something consistent to flag which sheets to process and which ones NOT to process.

    This should do it:
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    03-04-2013
    Location
    US
    MS-Off Ver
    MS Office Home and Business 2010
    Posts
    7

    Re: Housekeeping payroll that pulls rows of information to different sheets

    Wow. Okay, well I've appreciated your help so far but no need to be condescending. When I was testing it there was data entered into the columns on the 'cleaning assignments' sheet. I deleted it all when I sent it to you. You asked me to send you a mockup. Maybe I should have realized that the mockup needed to include every sheet in the workbook and not just those relevant to the question being asked. Like I said in my earlier post- I clearly got myself in over my head and had I known that it would involve code that I would need someone else to do for me, I wouldn't have asked for it. Thanks again for the help though.

  14. #14
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Housekeeping payroll that pulls rows of information to different sheets

    Heh, thick skins go a long way. We're helping for free so you can forgive any text you read that sounds more condescending than it actually is.

    Anyway, you've got the updated code snippet above required for the macro to ignore all those other sheets, it will only execute on sheets that have something in H1 and "CLOCKSPOT HOURS" in cell B3. Try the updates on your workbook with data in "cleaning assignments" to transfer and see how it goes.

  15. #15
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Housekeeping payroll that pulls rows of information to different sheets

    THanks for the feedback. If that takes care of your original query, please select Thread Tools from the links above and mark this thread as SOLVED. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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