VBA Code To Get The Day Name From Date

Опубликовано: 02 Апрель 2026
на канале: Ctrl-Shift-Run
388
2

In this video, let's look at how we can use VBA code to get the day name from a date. This might be useful for those of you who have an older version of Excel which doesn't have an in-built function of Excel that can do so.

We'll be using the Choose() function to assign the numbers that the in-built Weekday() function returns to the days of the week. This works in all Excel versions and is much more reliable than using the Format option, which could sometimes return the wrong day.

00:00:15 - Function to get the day name from a date
00:05:26 - Subroutine to get the day name from a date

As always, the code will be up on our site in a few days. If there's any code that you'd like to have, let me know in the comment section.