Rounding to nearest day in the week

I need an expert.  
I do a/p run every Friday or if Friday is a holiday on Thursday.  I round the due date to the nearest a/p run day
Is there a function that will help me out with this.
Who is Participating?
Martin LissConnect With a Mentor Older than dirtCommented:
In VBA you could do something like this

If Weekday(Now) = 5 Then ' Thursday
    MyDate = MyDate + 1
End If

Open in new window

Or you can add this UDF to a module and use it like any other formula.

Function AdjDate(c As Range)

If Weekday(c.Value) = 5 Then
    AdjDate = c + 1
End If

End Function

Open in new window

Where do you store your list of holidays?
Jenedge73Author Commented:
Thanks you sir
Martin LissOlder than dirtCommented:
You're welcome and I'm glad I was able to help.

Marty - MVP 2009 to 2013
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.