Getting Business Days to work within my formula

Vincent Thank You

New Member
Joined
Oct 3, 2017
Messages
18
Good morning,

I am a new user here although I have been using your results via Google for quite some time. I've got a formula that I'm using to highlight past due dates, 2 days past due. I'd like to be able to highlight 2 days past due, business days only. I seen several formulas including WORDAY but I can't seem to get any of them to work within my formula. I'm excited to be here, hopefully I have followed all the rules and I can contribute in the future as well.
Code:
 Columns("I:I").Select
    Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
        Formula1:="=TODAY()-2"
    Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
    With Selection.FormatConditions(1).Font
        .Color = RGB(255, 0, 0)
        .TintAndShade = 0
 
Last edited by a moderator:

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Welcome to the forum.

For Workdays, you would need:

Code:
Formula1:="=WORKDAY(TODAY(),-2)"
 
Upvote 0
Welcome to the forum.

For Workdays, you would need:

Code:
Formula1:="=WORKDAY(TODAY(),-2)"

Hey RoryA!

Thank you very much. I must of tried every possible version of that formula except the correct one, thank you. Below is the corrected formula used to highlight dates 2 Business Days past due for Column I, red:


Columns("I:I").Select
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
Formula1:="=WORKDAY(TODAY(),-2)"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Color = RGB(255, 0, 0)
.TintAndShade = 0
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,271
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top