+ Reply to Thread
Results 1 to 8 of 8

VB Code to reorganize data..

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to reorganize data..

    Hello:

    Please refer to attached file.

    I have ClockIn-Out data as shown in Sheet1.
    I need to reorganize the data.
    Below is what i need to accomplise.
    I have created Unique Employee list in column A in Sheet2.

    I need VB Code to look up data for 1st Employee in Cell C5 in Sheet2 and depending on the day and date,
    add hours worked on particular day from column E Sheet1 into corresponding cell in range H4:N56.


    Let me know if you have any questions.
    Thanks.
    Riz
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to reorganize data..

    Hello:

    It would be ok if this can be done thru formula also.
    Please let me know if you have any questions.
    Thanks.

    Riz

  3. #3
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VB Code to reorganize data..

    Maybe :

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to reorganize data..

    Hi Karedog:

    Thanks a lot..it works and it needs little tweaking for my requirement.
    Please refer to attached excel file and pdf flowchart.
    I need to use the code for all employees in column A and create pdf for each employee.
    Your code and my pdf code works great but it crashes after 1 employee's pdf file is created.
    Also need total which becomes zero, although i had formula in Total column to add Mon-Sun hours.
    Below is my pdf code which works:

    Please Login or Register  to view this content.
    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to reorganize data..

    Hi Karedog:

    Attached is the error in the code when i loop from A5 to A48.
    Please let me know if you have any questions.
    Thanks.

    Riz
    Attached Images Attached Images

  6. #6
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VB Code to reorganize data..

    You are welcome.

    Please Login or Register  to view this content.
    Sub Master is the one that you must run (sub Worker will be called from sub Master).

  7. #7
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to reorganize data..

    Hi Karedog:

    Great work....little correction needed.
    Need to set PDF Page Zoom to 90% and Margin to as attached pic.
    This is make it to print on one single page....currently it is printing on 4 pages.
    Have a look at attached pdf which prints on single page.
    Also would add current year (2016) in front of pdf File Name.
    So basically File name would be 2016_EmployeeName.
    Please let me know if you have any questions.
    Thanks.

    Riz
    Attached Images Attached Images
    Attached Files Attached Files

  8. #8
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VB Code to reorganize data..

    Please replace the sub Master() with this code :

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VB Code to reorganize data in a sheet
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-20-2016, 08:27 PM
  2. [SOLVED] VB Code to reorganize ClockINOut
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-09-2016, 06:29 PM
  3. [SOLVED] VB Code to reorganize data
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 03-29-2016, 04:24 PM
  4. I need to reorganize the data with VBA
    By baetienne in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-29-2014, 03:40 PM
  5. Reorganize data
    By Kayline in forum Excel General
    Replies: 6
    Last Post: 03-06-2013, 11:57 AM
  6. Reorganize a data set
    By RPADC in forum Excel General
    Replies: 3
    Last Post: 07-11-2010, 02:19 PM

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