+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting: Highlight Row with date that is current week but NOT today

  1. #1
    Registered User
    Join Date
    02-04-2015
    Location
    Toledo, OH
    MS-Off Ver
    2013
    Posts
    12

    Conditional Formatting: Highlight Row with date that is current week but NOT today

    Requesting formula that will highlight a row when a cell in that row contains a date and that date is this week but not to highlight the row if that date is today.

    Thank you for your time!

    Colton4

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,173

    Re: Conditional Formatting: Highlight Row with date that is current week but NOT today

    ignore post
    Last edited by etaf; 01-21-2022 at 04:50 PM.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,173

    Re: Conditional Formatting: Highlight Row with date that is current week but NOT today

    I think this will work ok, maybe much better ways to do it

    A sample spreadsheet would have helped here

    I'm using sumproduct to see if the weeknumber using WEEKNUM for any dates in the row , is the same Weeknum as today()
    and set to use the Sun-Sat option 1 for week number - so weeknum( cell , 1)
    Now we will get a number from 1 to 7 any date in the row is the same weeknumber as today()
    a 0 is false and 1 and above is TRUE

    I have then also added a countif() to see if any date in the row is also equal to today()
    And that will provide a number 1 to ?? which is TRUE a 0 is false
    BUT we want the opposite of that - if there is a date of today in the row , then we want a false - so
    NOT( countif ( range , today() ) )

    so combined becomes
    =AND(SUMPRODUCT(--(WEEKNUM($A1:$Z1+0,1)=WEEKNUM(TODAY()))),NOT(COUNTIF($A1:$Z1,TODAY())))

    So the range needs to be adjusted to suit your data

    I have used B10 to K20 as the range with dates in and setup the conditional formatting - using
    =AND(SUMPRODUCT(--(WEEKNUM($B10:$K10+0,1)=WEEKNUM(TODAY()))),NOT(COUNTIF($B10:$K10,TODAY())))

    I have also for clarity added another conditional format to show which cell has today() date in

    then in column M, N, P - i show the formulas in action , just for reference
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,881

    Re: Conditional Formatting: Highlight Row with date that is current week but NOT today

    Did you want VBA?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    02-04-2015
    Location
    Toledo, OH
    MS-Off Ver
    2013
    Posts
    12

    Re: Conditional Formatting: Highlight Row with date that is current week but NOT today

    Thanks etaf! Worked perfect! Also, thank you to ALIGW for your time.

    Love this forum!

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,173

    Re: Conditional Formatting: Highlight Row with date that is current week but NOT today

    you are welcome

    Also if you are nolonger using 2013 version, maybe worth updating your profile , some of the later versions of excel newer functions which can do a lot more.

    as i say , its a bit clunky , so someone may have a better solution, which may not use so much resource

    @AliGW - opps didn't look close enough at which forum it was in !!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Conditional Formatting to Highlight Current Week
    By MihaiN247 in forum Excel General
    Replies: 6
    Last Post: 04-14-2020, 07:17 AM
  2. Replies: 1
    Last Post: 06-09-2016, 11:38 AM
  3. [SOLVED] Highlight week number using Conditional formatting - shows incorrect week
    By spliffter in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 02-26-2016, 09:52 AM
  4. [SOLVED] Lookup current week using today's date
    By jidef in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-25-2014, 12:02 PM
  5. [SOLVED] Conditional Formatting to highlight worksheet according the current date.
    By bishtnirmal in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-17-2013, 05:08 AM
  6. Replies: 4
    Last Post: 02-13-2013, 01:18 PM
  7. Replies: 1
    Last Post: 01-24-2013, 04:52 PM

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