+ Reply to Thread
Results 1 to 13 of 13

[Urgent] Creating a Macro to Copy Time sheets Data of employees into Master Sheet

  1. #1
    Registered User
    Join Date
    04-10-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    31

    Exclamation [Urgent] Creating a Macro to Copy Time sheets Data of employees into Master Sheet

    Hi Guys,

    I am new to Excel Programming. Now, i need to create a macro to copy the data from time sheets of different employees into the Master sheet. ie., each employee's time sheet details in to a separate sheet. if any employee fails to provide his/her time sheet details. a mail must be sent to the respective employees regarding the Time sheet submission. i am providing the sample data of my files too. please provide your suggestions.


    P.S: Intentionally TS_Employee5.xlsx timesheet isn't provided. in which case, i have to send a mail to the respective employee, in order to remind him about the time sheet.

    Thanks & Regards
    Attached Files Attached Files
    Last edited by kkcmania; 04-15-2013 at 04:24 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: [Urgent] Creating a Macro to Copy Time sheets Data of employees into Master Sheet

    Which are the fields from the individual TS_Employee sheets that should be copied to the master sheet?

    Also, you might have to include the email code in a separate thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    04-10-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: [Urgent] Creating a Macro to Copy Time sheets Data of employees into Master Sheet

    I want to copy the exact TS_Employee timesheet as it is in to the Master Sheet. i will open a separate thread for email code. thank you.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: [Urgent] Creating a Macro to Copy Time sheets Data of employees into Master Sheet

    What should the sheet be named after its copied to the master sheet?

  5. #5
    Registered User
    Join Date
    04-10-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: [Urgent] Creating a Macro to Copy Time sheets Data of employees into Master Sheet

    The same name as that of its file name.

  6. #6
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: [Urgent] Creating a Macro to Copy Time sheets Data of employees into Master Sheet

    How many employees are you talking about ?



  7. #7
    Registered User
    Join Date
    04-10-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: [Urgent] Creating a Macro to Copy Time sheets Data of employees into Master Sheet

    Quote Originally Posted by snb View Post
    How many employees are you talking about ?
    Less than 20 employees.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: [Urgent] Creating a Macro to Copy Time sheets Data of employees into Master Sheet

    Try this code
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button

  9. #9
    Registered User
    Join Date
    04-10-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: [Urgent] Creating a Macro to Copy Time sheets Data of employees into Master Sheet

    Please Login or Register  to view this content.
    Runtime error '9'

    Subscript Out of Range error rised.

    Will u Please tell me the reason. Thank u..

  10. #10
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: [Urgent] Creating a Macro to Copy Time sheets Data of employees into Master Sheet

    This error shows that the sheet name in your source files are not matching the sheet name in the code.

    You need to replace Sheet1 with the name of the sheet in the TS_Employee...files.

  11. #11
    Registered User
    Join Date
    04-10-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: [Urgent] Creating a Macro to Copy Time sheets Data of employees into Master Sheet

    Quote Originally Posted by arlu1201 View Post
    This error shows that the sheet name in your source files are not matching the sheet name in the code.

    You need to replace Sheet1 with the name of the sheet in the TS_Employee...files.
    Yeah, Its working fine arlu1201. Thanx a lot.

  12. #12
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: [Urgent] Creating a Macro to Copy Time sheets Data of employees into Master Sheet

    Runtime error '76'

    Path not found.

    Will u Please tell me the reason. Thank u..

  13. #13
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: [Urgent] Creating a Macro to Copy Time sheets Data of employees into Master Sheet

    1Thakur,

    Ensure that you change the path in this line
    Please Login or Register  to view this content.
    to reflect your system path where the files are.

+ 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