+ Reply to Thread
Results 1 to 7 of 7

Copying or Extracting data to another sheet

  1. #1
    Registered User
    Join Date
    05-31-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    4

    Copying or Extracting data to another sheet

    Hi guys!

    I need your help on how to copy data on another sheet.

    I need to extract the data of every employee on separate worksheet.

    Please see the attached file samplefile.xlsx. Sheet entitled mainworksheet consists of the data that needs to be copied on another sheet for every employee.

    Each employee has his/her own sheet containing the data on the mainworksheet.

    Sheet2 contains the format of what the new sheet of every employee should look like.

    I hope you can help me on this. Thank you so much.
    Last edited by virgolady; 05-31-2012 at 07:22 AM.

  2. #2
    Registered User
    Join Date
    05-31-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copying or Extracting data to another sheet

    i hope someone can help me on my problem

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Copying or Extracting data to another sheet

    virgolady,

    Welcome to the forum!
    Attached is a modified version of your posted workbook. It contains the below macro. Your template sheet ha some fields that weren't on the 'mainworksheet' so I wasn't sure exactly where to output the information. As a result, the information is just output to where you had it in your example file (to the right of template sheet's setup).
    Please Login or Register  to view this content.


    How to use a macro:
    1. Make a copy of the workbook the macro will be run on
      • Always run new code on a workbook copy, just in case the code doesn't run smoothly
      • This is especially true of any code that deletes anything
    2. In the copied workbook, press ALT+F11 to open the Visual Basic Editor
    3. Insert | Module
    4. Copy the provided code and paste into the module
    5. Close the Visual Basic Editor
    6. In Excel, press ALT+F8 to bring up the list of available macros to run
    7. Double-click the desired macro (I named this one tgr)
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    906

    Re: Copying or Extracting data to another sheet

    Sorry...
    Last edited by hecgroups; 05-31-2012 at 11:57 AM.

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Copying or Extracting data to another sheet

    hecgroups, did you post in the right place? This isn't your thread, and the script provided here was not from watersev...

  6. #6
    Registered User
    Join Date
    05-31-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copying or Extracting data to another sheet

    openshift.xlsxthank you so much tigeravatar.. the code helps.. can you please help me also with this excel file i attached.. because the schedule of the employees on that excel file are open shift.. they don't have fixed schedule.. and I need their log in and log out be plotted on the table also. every employee still has his/her worksheet. If the employee's log in is from 4:00 am to 12 pm then it should go to the morning log in.. if the log in is from 12:01 pm to 6 pm, it will go to the afternoon log in.. if the log-in is from 6 pm to 3:59 am it will go to the evening log-in.. For the log-out, if the employee log out 4:00 am to 12 pm, it will go to morning log-out.. If the employee log-out from 12:01 pm to 6 pm, it will go to afternoon log-out and if the employee log-out from 6:01 pm to 3:59 am it will go to the evening log-out.. then the att_time column on the mainworksheet will be plotted also on the Time Worked column on the template..thanks again

  7. #7
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Copying or Extracting data to another sheet

    Looks like this question is being asked by two different people, here's the other thread:
    http://www.excelforum.com/excel-prog...e-in-vb-2.html

+ 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