+ Reply to Thread
Results 1 to 7 of 7

Weekdays - Conditional Formatting

  1. #1
    Registered User
    Join Date
    10-11-2007
    Posts
    31

    Weekdays - Conditional Formatting

    Hello,

    I am using the following formula on a conditional formatting to color cell A1 based on cell N5 date =$N5=TODAY()-2

    The problem is that I need this formula to consider only weekdays, how can apply formula weekdays to my formula?

    Tks!
    Last edited by Kinna; 05-19-2009 at 12:15 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Weekdays - Conditional Formatting

    =$N5=TODAY()-SMALL(IF((WEEKDAY(TODAY()-(ROW(INDIRECT("1:"&2*10))),2)<6),ROW(INDIRECT("1:"&2*10))),2)

    replace the 2's with other number if you want to subtract other than 2 days...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    10-11-2007
    Posts
    31

    Re: Weekdays - Conditional Formatting

    Hi!

    I've tried your suggestion, but it ends up subtracting 4 days instead of 2. I have tried a few things but wasn't able to make it work properly.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Weekdays - Conditional Formatting

    With that formula I get a result of May 15th which is 2 working days prior to today. Is that wrong?

  5. #5
    Registered User
    Join Date
    10-11-2007
    Posts
    31

    Re: Weekdays - Conditional Formatting

    Lol, I'm sorry my bad! Your formula is more than perfect! Thank you very much!!!

    Just one more quick question, I am trying to do a scale on my consditional formatting like this:
    -2 weekdays from today = yellow
    -3 weekdays from today = orange
    -4 weekdays from today = red

    So, how am I supposed to make the last two formulas subtract 3 and 4 days?
    I have tried the below just like your hint in the first post but it did not work...

    ORANGE
    =$N5=TODAY()-SMALL(IF((WEEKDAY(TODAY()-(ROW(INDIRECT("1:"&3*10))),3)<6),ROW(INDIRECT("1:"&3*10))),3)

    RED
    =$N5=TODAY()-SMALL(IF((WEEKDAY(TODAY()-(ROW(INDIRECT("1:"&4*10))),4)<6),ROW(INDIRECT("1:"&4*10))),4)

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Weekdays - Conditional Formatting

    Sorry... it's not all the 2's you change... there is one that remains for the Weekday() function...

    so it would be:

    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-11-2007
    Posts
    31

    Re: Weekdays - Conditional Formatting

    Awesome! Thank you very much!!!

    I hope you have a wonderful week!

+ 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