+ Reply to Thread
Results 1 to 12 of 12

Option Boxes, Start Date & Foreground Coloring

  1. #1
    Registered User
    Join Date
    03-18-2010
    Location
    Layton, UT
    MS-Off Ver
    Excel 2013
    Posts
    73

    Option Boxes, Start Date & Foreground Coloring

    Sorry for such a long post, but can anyone help me workbook attached.

    Thanks in Advance

    I have a calendars worksheet on which I want to use a foreground color to mark paydays for various pay day frequencies and occurrences, using options in option groups.
    The problem is how do I get foreground colors for paydays, depending on options selected in two option groups and a Start Date, where Option Group 1: Weekly, Bi-weekly, Semi-Monthly, Monthly; where Option Group 2: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday; and where a Start Date is entered in a cell.

    For example, I select Weekly in OG1, select Thursday in OG2, and enter 1/7/2010 (first Thursday of 2010), then programming color Thursday of every week (1/7/2010 to end of year) a certain foreground color. In this case, regardless of the day of the week chosen, foreground color for this day, in every week of the year, is colored. If Wednesday was selected, date would be 1/6/2010.

    In another example, I select Bi-Weekly in OG1, select Friday in OG2, and enter 1/1/2010 (first Friday of 2010), then programming cause every other Friday, beginning at 1/1/2010 to have a certain foreground color. In this case, first payday Friday could be 1/8/2010, with every other Friday, including this one, to have a certain foreground color. In this example only first or second Friday (or whatever day selected) of the year should be entered as Start Date, but any day can be selected

    In yet another example, I select Semi-Monthly (paid twice every month) in OG1, no selection is necessary in OG2 or the day (Sun, Mon, etc) on which the 1st day of January fall could be selected, enter Start Date of 1/1/2010, then the programming cause Start Date and the day/date which is 14 days ahead (the 15th) to be foreground color coded. The only other Start Date could also be the 16th, with the 30th or last day of month (February).

    In the final example, I select Monthly in OG1, no selection is necessary in OG2, but the Start Date entered is the pay date and the date where foreground is colored in every month. In the case of February, which only have 28 or 29 days, if the 30th or 31st is the Start Date or payday, then the default is last day of February.
    Last edited by catnam; 03-19-2010 at 05:41 PM.

  2. #2
    Forum Contributor
    Join Date
    02-04-2010
    Location
    Hertfordshire, England
    MS-Off Ver
    Office 2007 (home) Office 365 (work)
    Posts
    134

    Re: Option Boxes, Start Date & Foreground Coloring

    Hi catnam

    Here is something you can start off with. I changed the option boxes in your original file, to make is a bit easier to code for changes in the option boxes.

    Please let me know how you get on.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-18-2010
    Location
    Layton, UT
    MS-Off Ver
    Excel 2013
    Posts
    73

    Re: Option Boxes, Start Date & Foreground Coloring

    Quote Originally Posted by excelxx View Post
    Hi catnam

    Here is something you can start off with. I changed the option boxes in your original file, to make is a bit easier to code for changes in the option boxes.

    Please let me know how you get on.
    Hi excelxx,

    I most sincerely appeciate your help and your programming to start is working just fine. However, before we get to far along, I believe I should provide you the actual workbook (v3) which I want to use this in. I copies the code from v2 into module 1 of v3, but I could not get the radio buttons to copy over. Everything as far as the calendars are in the exact same location on sheet as in v2. So if you can please move or modify the option buttons I surely appreciate it. As you may notice, there is cell at top of calendars that allows you to select the year. This cause the calendars to change for the year selected, I hope you can make the coding work with this feature. Please note, I would like the FONT color to change, instead of background color, because background color indicate federal holidays.

    Once you get it back to the point as in v2, please check out a few things I noticed:
    1. After option button for Saturday is selected, it gets stuck on, even when I select another button.
    2. Maybe this should happen, but when radio button is select in "I AM PAID ON" group, the selection in "I AM PAID" goes away.
    3. For Monthly, the payday for each month should be the date entered below option buttons.
    4. For Semi-Monthly, paydays can be 1st and 15th, or 15th and last day of the month.

    I'm sorry if I've cause you too much trouble moving this to v3 or adding new requirements. But I do appreciate all your help.

    catnam
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    02-04-2010
    Location
    Hertfordshire, England
    MS-Off Ver
    Office 2007 (home) Office 365 (work)
    Posts
    134

    Re: Option Boxes, Start Date & Foreground Coloring

    Hi catnam

    Currently on 2003 at the moment, and can't open the file. (it is refuses to convert)

    It did notice the problem with the radio buttons not being independent of each group and I resolved that on a new version. I'll check the problem with the Saturday option button once I get to my Office 2007.

    For the monthly option, if the user enters the 25th of January as being the first pay date, then the 25th of every month should be highlighted.

    For the semi-monthly option, the only options which should be available to the user would be the 1st /15th or 15/last day of the month.

  5. #5
    Registered User
    Join Date
    03-18-2010
    Location
    Layton, UT
    MS-Off Ver
    Excel 2013
    Posts
    73

    Re: Option Boxes, Start Date & Foreground Coloring

    Thanks. That is correct for the monthly and semi-monthly options.

  6. #6
    Forum Contributor
    Join Date
    02-04-2010
    Location
    Hertfordshire, England
    MS-Off Ver
    Office 2007 (home) Office 365 (work)
    Posts
    134

    Re: Option Boxes, Start Date & Foreground Coloring

    Hi catnam

    I have made the changes as per your previous post.

    Please let me know if you have any problems.

    Regards
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-18-2010
    Location
    Layton, UT
    MS-Off Ver
    Excel 2013
    Posts
    73

    Re: Option Boxes, Start Date & Foreground Coloring

    Hi excelxx,

    This is looking good. The various selection combinations seems to be working once I get to a good starting point. However, the program seems to get a little confused when going from one selection combination to another, or when you change years. Maybe a button that will bring it to a clear default setting and some code that will on changing the year will it bring it to the clear setting will help. Also I was wondering if both the pop-up box and the cell for enter the date are necessary. Maybe just using the pop-up box will simplify things. I really apprecate this. It would have taken me months to figure this out.

  8. #8
    Forum Contributor
    Join Date
    02-04-2010
    Location
    Hertfordshire, England
    MS-Off Ver
    Office 2007 (home) Office 365 (work)
    Posts
    134

    Re: Option Boxes, Start Date & Foreground Coloring

    Hi catnam

    The macro did not have allowances for changing the years or leap years for that matter.

    I have now changed the code to allow for the changing of years, in the clearing of the formatting and the calculation of the pay dates.

    Also it also takes into consideration the leap years in the calculation of the pay dates.

    Regards
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    03-18-2010
    Location
    Layton, UT
    MS-Off Ver
    Excel 2013
    Posts
    73

    Re: Option Boxes, Start Date & Foreground Coloring

    Hi excelxx,

    Everything works great!!! I really appreciate your help on this. Just one last question, do I still need the date cell below the days option group?

    Thanks So Much
    catnam

  10. #10
    Forum Contributor
    Join Date
    02-04-2010
    Location
    Hertfordshire, England
    MS-Off Ver
    Office 2007 (home) Office 365 (work)
    Posts
    134

    Re: Option Boxes, Start Date & Foreground Coloring

    Hi catnam

    You are welcome.

    No you don't need the date at the bottom of the options group, as it is not being used by the code, it is only populated with the value that the user enters in the pop-up boxes.

    Regards

    Ps Please provide feedback using the reputation button. Thanks

  11. #11
    Forum Contributor
    Join Date
    02-04-2010
    Location
    Hertfordshire, England
    MS-Off Ver
    Office 2007 (home) Office 365 (work)
    Posts
    134

    Re: Option Boxes, Start Date & Foreground Coloring

    Hi catnam

    Please find attached an amended file, where the date for the bi-weekly selection is taken into account when highlighting the pay dates.

    I haven't been able to sort out the issue with the Mondays. I did have a look at it and the code is formatting the cells as it should but I think the conditional formatting for the holidays seems to be taking precedence over the formatting for the pay date.

    Regards
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    03-18-2010
    Location
    Layton, UT
    MS-Off Ver
    Excel 2013
    Posts
    73

    Re: Option Boxes, Start Date & Foreground Coloring

    Thanks again excelxx. I want worry about the Monday thing.

    Take care.
    catnam

+ 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