[Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 118
  • Last Modified:

Conditional formatting based on comparing today's date to date string in cell

Column W is formatted as shown below (initials & date):
AC–8 Aug 14
MN-14 Jul 14
MC-2 Aug 14

I would like to apply conditional formatting to the cells in Column W based on the following criteria:
Cell background = red if today's date is > 5 working days than date string in Column W cell

Below is my attempt, but it doesn't factor in working days, and more to the point, doesn't work:

If you need any further information, just let me know...

  • 2
1 Solution
Glenn RayExcel VBA DeveloperCommented:
Hi, you're on the right track; just need to change your conditional formula to this:

It assumes that there are two (2) initials, a dash (or other single separating character), then the date.

barry houdiniCommented:
You can use REPLACE to remove the first 3 characters.....and then use NETWORKDAYS to count working days between that date and TODAY, i.e.


Note that NETWORKDAYS counts both start date and end date so you may need to experiment to see whether you may need >6 rather than >5 depending on your exact requirements

regards, barry
AndreamaryAuthor Commented:
Thanks to you both for the quick response! The first solution seemed to include all days of the week. As I was looking for a formula based on working days, the second solution, which included that criteria, did the trick.
AndreamaryAuthor Commented:
Thanks very much, Barry! I did experiment and using > 6 worked perfectly...


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now