Results 1 to 7 of 7

Thread: fill a row with weeks of a particular month

  1. #1

    fill a row with weeks of a particular month



    Register for a FREE account, and/
    or Log in to avoid these ads!

    hi

    in my sheet i have a cell that displays the month. below that i have the amount of days for that particular month. the following row holds standard values (a to c which depicts shifts) that is coloured. each shift is on for 7 days.
    i want to the shifts to 'move' accordingly if the month is changed to the next month.
    so looking at the sample workbook at the end of January shift B will only have worked 4 of their 7 days required, therefor February 1 to 3 will display shift B. then February 4 to 10 will display shift C, and so on...

    any help is greatly appreciated.
    Attached Files Attached Files

  2. #2
    Magician NoS's Avatar
    Join Date
    Jan 2013
    Location
    British Columbia
    Posts
    675
    Articles
    0
    Excel Version
    Excel 2010 64bit
    I think this will look after what you are trying to do. Just run the macro and put a date in the input box.

    Good Luck
    NoS
    Attached Files Attached Files

  3. #3
    thank you NoS, this seems to work... i will run through it and come back to you if i have any questions if that is ok...

  4. #4
    Hi NoS, should i wish to display this over a period of 3 months (so i can have a form with 4 radio buttons that can do the selection) each radiobutton once clicked will display 3 months. so radiobutton 1 = jan - march, radiobutton 2 = apr - jun, etc. that way no need to type a period as it is set... could you please assist?

  5. #5
    Magician NoS's Avatar
    Join Date
    Jan 2013
    Location
    British Columbia
    Posts
    675
    Articles
    0
    Excel Version
    Excel 2010 64bit
    Hello roninn75

    I don't know where you are going with this. It would appear that something with a weekly schedule like this would have the section below the date used for check marks or something.

    So I guess the question is if you're looking at command buttons that show 3 month sections of a much larger table?

    NoS

  6. #6
    NoS, basically this is part of a larger table yes. however the selection for this particular part is stand alone. meaning that a userform will be used that if the radiobutton or normal button is selected, it will display the schedule like the above workbook does. the rest of the tables are derived from that with dropboxes and vlookups... that part i have sorted already. initially it was meant to be a monthly period but that will be unnecessary if i can do it quarterly. i hope that makes sense.

  7. #7
    Magician NoS's Avatar
    Join Date
    Jan 2013
    Location
    British Columbia
    Posts
    675
    Articles
    0
    Excel Version
    Excel 2010 64bit
    Roninn75

    Here's a workbook with macro that will give shift schedule for what ever dates you manully enter into the modules code, from 1 day up to however many columns Excel has.
    Added code to limit to 1 year because 10 years went a long way across the page.

    Be aware this VBA is not sheet specific. It does its thing on the active sheet.

    Hope this helps towards achieving what you're after.

    NoS
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •