Business Days

  • Thread starter Thread starter Michael from Austin
  • Start date Start date
M

Michael from Austin

In need to be able to highlight a row if the date in that row is greater than
10 business days. I have already stored today as a variable called "today."
 
Use the WORKDAY function. You could set up Conditional Formatting using:
"=WORKDAY(today,10)>$A$1"

Give that a try.
Matthew Pfluger
 
In need to be able to highlight a row if the date in that row is greater than
10 business days. I have already stored today as a variable called "today."

Go to Tools > Addins and make sure "Analysis Toolpak - VBA" is checked. In
the VBE, go to Tools > References and set a reference to atpvbaen.xls. Then
you can call the NETWORKDAYS function directly

Sub HighlightDays()

If Abs(networkdays(Sheet1.Range("A4").Value, Date)) > 10 Then
Sheet1.Range("A4").EntireRow.Interior.Color = vbYellow
End If

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top