+ Reply to Thread
Results 1 to 14 of 14

Macro Assistance Needed for Scheduling

  1. #1
    Registered User
    Join Date
    02-11-2011
    Location
    Durham, NC
    MS-Off Ver
    Excel 2007
    Posts
    19

    Macro Assistance Needed for Scheduling

    I would like a macro that would find the current date on a large on-going schedule and create a daily schedule on the next sheet. More specifically the jobs that are on today's date under the extractions section would go into one row without spaces in the extractions table on sheet 2, the jobs that are on today's date under the LCMS section would go into one row without spaces in the LCMS table on sheet 2, and the jobs that are on today's date under the GCMS section would go into one row without spaces in the GCMS table on sheet 2. I was helped on a smaller version but my skills are very weak with VBA and I was not sure how to adapt it to the current schedule. Attached is an example, Sheet 2 shows the format that it should be in. Ignore the instrument and operator rows as those will be assigned daily. Thanks for any help.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Macro Assistance Needed for Scheduling

    Hi

    See how this goes.
    Please Login or Register  to view this content.
    rylo

  3. #3
    Registered User
    Join Date
    02-11-2011
    Location
    Durham, NC
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Macro Assistance Needed for Scheduling

    Thanks rylo,

    Is it possible to create a way to select the date that you would want to import? This would be helpful to see what ran yesterday and to schedule for the runs for tomorrow.

    thanks again,

    Jay

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Macro Assistance Needed for Scheduling

    Jay

    Very possible. How would you like to be able to nominate a date? Entry into a cell? Request from the macro when run? Do you want to have things changed so that the macro is run on demand, rather than when it opens? Or have it run on opening, but be able to manually call on demand?

    rylo

  5. #5
    Registered User
    Join Date
    02-11-2011
    Location
    Durham, NC
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Macro Assistance Needed for Scheduling

    Hey rylo,

    being able to run on opening and then being able to manually call on the date would be useful.

    Thanks,

    Jay

  6. #6
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Macro Assistance Needed for Scheduling

    Hi

    Run on opening will work as it stands, and being able to call means creating a button that will just call the workbooks_open macro. But you don't specify how you want to nominate the date. Do you want the auto open to run the standard "today" run, or do you want it to request data from the user? If from the user, do you want it to be able to nominate "today" or always have to enter a date?

    rylo

  7. #7
    Registered User
    Join Date
    02-11-2011
    Location
    Durham, NC
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Macro Assistance Needed for Scheduling

    The auto open should be "today". In order to nominate the date I think that it should be, the user would enter in the date that they want to view and then have a button to press in order to retrieve the information from that date. Does that make sense? Thanks for your help rylo.

    Jay

  8. #8
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Macro Assistance Needed for Scheduling

    Hi

    Where would they enter the date?

    rylo

  9. #9
    Registered User
    Join Date
    02-11-2011
    Location
    Durham, NC
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Macro Assistance Needed for Scheduling

    I have attached a sample spreadsheet. On sheet 2 you will see the buttons. Let me know if this would be the best way or do you have another idea.

    Thanks,

    Jay
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Macro Assistance Needed for Scheduling

    Hi

    Easier way.

    If sheet2!C18 is blank, then it will bring in today's data. If you have a date in there, then it will bring back the data for the nominated date. So you really only need to have one button to manually call the macro, and it depends on what is in C18.

    Be careful though. If you save the file with a date in C18, then it will bring back data for that date next time it opens. You could do a workbook_ beforeclose to make sure C18 is blank. Or maybe add an extra command to the macro to blank out C18 whenever it is run.

    Please Login or Register  to view this content.
    rylo

  11. #11
    Registered User
    Join Date
    02-11-2011
    Location
    Durham, NC
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Macro Assistance Needed for Scheduling

    It is not importing anything? what am I doing wrong?

  12. #12
    Registered User
    Join Date
    02-11-2011
    Location
    Durham, NC
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Macro Assistance Needed for Scheduling

    Ok, I got it to run. But changing the date in c18 does not import work from that date.

    Jay

  13. #13
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Macro Assistance Needed for Scheduling

    Hi

    Oops, try this.
    Please Login or Register  to view this content.
    rylo

  14. #14
    Registered User
    Join Date
    02-11-2011
    Location
    Durham, NC
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Macro Assistance Needed for Scheduling

    I have this macro that grabs the information from a schedule for the current date or which ever date that is clicked on the calender. I was wondering how to keep the format of just the text (whether bold or a different color that is imported from the schedule. Attached the spreadsheet with the macro.

    Thanks,

    Jay
    Attached Files Attached Files

+ 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