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

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
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,215,824
Messages
6,127,104
Members
449,358
Latest member
Snowinx

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