+ Reply to Thread
Results 1 to 11 of 11

Formatting

  1. #1
    Registered User
    Join Date
    12-17-2010
    Location
    Hull England
    MS-Off Ver
    Excel 2003
    Posts
    13

    Formatting

    Hi all, I am struggling to make this do what i would like and wondered if anyone here could help me?

    I would like the whole row to change colour if possible. Green for the first 21 days, amber for days 22-28 and red for more than 28. If a date is entered in completed I then want the line to go grey to show it has been completed.Including the job date collum.

    I have attached the sheet to help.

    Thanks if anyone can assist me with this.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Formatting question.

    Question:
    Are you wanting the row to turn colors if date in Column "A" is:

    (Green)...."0-21 days old",
    (Yellow)..."between 22-27 days old",
    (Red)......."28 days or older "

    .........than today's date?
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  3. #3
    Registered User
    Join Date
    12-17-2010
    Location
    Hull England
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Formatting question.

    Sorry, from the date of the job in the left collum,

  4. #4
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Formatting question.

    I guess my question is:
    How does it know how old that date is (the one on the left), if you don't have a second date to check against?

    It can check that date against "today's date" or "any date you choose", if that is what you are trying to do.

  5. #5
    Registered User
    Join Date
    12-17-2010
    Location
    Hull England
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Formatting question.

    I mean the difference between todays date and the date the job was given and entered in the box. My main problem is getting the row to go grey when a date is put in the date completed box.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Formatting

    Hello Rick448,

    This macro will change the row colors like you want. Since you had multiple sheets in the workbook, I assumed you would want to apply this to sheet. If you want to the macro to run on specific sheet or sheets, let me know and I'll adjust it for you.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  7. #7
    Registered User
    Join Date
    12-17-2010
    Location
    Hull England
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Formatting

    I want to apply that to all the sheets, where do i put the code in?

    Thanks for the help. Awesome place

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Formatting

    Hello Rick,

    The attached workbook is already set up to apply the formatting to all sheets. The macro is located in the ThisWorkbook module. Here is the event procedure with the macro code...
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    12-17-2010
    Location
    Hull England
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Formatting

    Thanks for the help everyone. That has saved me a massive amount of work. Totally awesome site.

  10. #10
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Formatting

    Rick,
    Just a note....if you want to use the same exact colors that you had in the legend on the right of your sheet, you can change the color indexes in the lines of code...
    ie.
    Bright Green = 4
    Yellow(actually it's Light Orange) = 45
    Red = 3

  11. #11
    Registered User
    Join Date
    12-17-2010
    Location
    Hull England
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Formatting

    Quote Originally Posted by jwright650 View Post
    Rick,
    Just a note....if you want to use the same exact colors that you had in the legend on the right of your sheet, you can change the color indexes in the lines of code...
    ie.
    Bright Green = 4
    Yellow(actually it's Light Orange) = 45
    Red = 3
    Thanks John.

+ 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