+ Reply to Thread
Results 1 to 4 of 4

macro to reorganize date

  1. #1
    Registered User
    Join Date
    01-10-2012
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    2

    macro to reorganize date

    I am trying to create a macro which will reorganize a database. It consists of student names, date of month, and number of hours worked. That data needs to be reorganized to produce a list with student name, date, and hours for each of the student and date combinations.Book1.xlsm An example of what I have and what I need is attached.

    My problem comes from the fact that there are a different number of days in each month, and variable number of students, so the macro has to detect blank cells.

  2. #2
    Registered User
    Join Date
    01-10-2012
    Location
    colorado, usa
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: macro to reorganize date

    It is hard to say for sure without you having a sample work sheet up, but you should be able to put if statements around any formula you are normally typing to account for possible empty cells. Ex. If(whatevercell<>0,normal formula,0 or other value)
    STOP! CONTINENTAL DRIFT.

  3. #3
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: macro to reorganize date

    Not sure if this is what you want.

    Assuming

    1. Your list is on “Sheet1”
    2. your days are in cells B2, C2, D2 etc and
    3. your names list starts in cell A2 and continues down,

    this macro will create a list like the one you specify on Sheet2 (to allow for variable numbers of date columns on Sheet1) of your workbook for every cell where there is a data value in the table, a student name in column A and a date on row 2:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-10-2012
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    2

    Talking Re: macro to reorganize date

    Thank you very much NickyC. Its works well, and will be real time time saver for us! Thanks again.

+ 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