Link to home
Start Free TrialLog in
Avatar of Jagwarman
Jagwarman

asked on

insert last business days date

In my macro I was using the below:

Dim td As Date
td = Format(Now() - 1, "DD/MM/YYYY")

This would insert the date for yesterday in the cell.

The user needs me to change this to the previous business day.

I know the formula would be =WORKDAY(TODAY(),-1)  but I cannot figure how to change this in the VBA code

Please help.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jagwarman
Jagwarman

ASKER

Thanks Rgonzo