Issue with VBA.Format(Today(), "dddd d, mmmm yyyy \Dw\Www\Qq")

Juggler_IN

Active Member
Joined
Nov 19, 2014
Messages
349
Office Version
  1. 2003 or older
Platform
  1. Windows
The statement
VBA Code:
VBA.Format(Today(), "dddd d, mmmm yyyy \Dw\Www\Qq")
gives the day count of the week assuming Sunday is day 1 of the week. So, today (7th August) is D6. How do I get D=5 (i.e. assuming week starts from a Monday)?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
You can use 'weekday' for that.

Formula =WEEKDAY(TODAY(),11)
VBA Code:
Weekday(Date,vbMonday)
 
Upvote 0
@jason75; Weekday with 11 doesnt work with VBA 2003.
 
Upvote 0
Please update your account details to show which version of Excel you use. That way members don't waste their time offering a solution that doesn't work.
 
Upvote 0
@jason75; Weekday with 11 doesnt work with VBA 2003.

jasonb75 supplied a formula and VBA option in post #2. Did you try the VBA option?
Make sure that you don't miss post #4
 
Upvote 0
Please update your account details to show which version of Excel you use. That way members don't waste their time offering a solution that doesn't work.
The platform page does not provide 2003 as an option. Lowest is 2007. How do i do it? 2003 as version?
 
Upvote 0
The platform page does not provide 2003 as an option. Lowest is 2007.
In that case whenever you start a thread you should state clearly in the first post that you are using Excel 2003. One problem is that most helpers will not remember too well exactly what is and is not available in that version. (Probably nearly time to upgrade. ;))
 
Upvote 0

Forum statistics

Threads
1,214,787
Messages
6,121,565
Members
449,038
Latest member
Guest1337

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