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
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
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.
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
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.
Thanks etaf! Worked perfect! Also, thank you to ALIGW for your time.
Love this forum!
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 !!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks