Hello.
Is there a function that will display the day from a date?
ie ‘Tuesday’ from ’23/1/01′
Thanks
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Day function
If you just want to display the day of the week, format the cell with the full date
eg, if the cell conatins “1-jan-01”, select it, the from the menu, Format,Cells, Custom, and enter “dddd”
If you want to test the day of the week, use the formula in another cell “=weekday(SourceCell)”. That will give you a number 1-7, where 1 = Sunday
Hi,
Not sure what you want to do with it, but this will list every Tuesday from now until 21st Jan 2003 in the first column of the first sheet of the active workbook:
Sub ListTuesdays()
Dim dblDateSerial As Double, lngDateAdd As Long, intRow As Integer
dblDateSerial = CDbl(Date)
intRow = 1
For lngDateAdd = 1 To 730
If Application.WorksheetFunction.Weekday(dblDateSerial + lngDateAdd, 1) = 3 Then
ActiveWorkbook.Sheets(1).Cells(intRow, 1).Formula = CDate(dblDateSerial + lngDateAdd)
intRow = intRow + 1
End If
Next ‘lngDateAdd
End Sub
Any use?
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.
Notifications