If statement help

P

Patrick Simonds

I need to create an If Statement that returns the day of the week

What I need is:

If Today = Sunday then Calendar1 = Date +5
If Today = Monday then Calendar1 = Date +6
 
D

Doug Robbins - Word MVP

If Format(Date, "dddd") = "Sunday" then
Format(DateAdd(Date, "d", 5), "dd MMMM yyyy")
Else If etc.
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
J

Jezebel

If Weekday(Now) = vbSunday then ...

But if you just want to set Calendar1 to Friday, you don't the IFs --

Calendar1 = Date + 6 - Weekday(Now, vbFriday)
 

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

Top