In this article, you will learn how to get name of the day from date.
If you want to get the day name of day (i.e. Monday, Tuesday, & so on) from a date, there are many different ways to get the same result in Excel. However, we will cover 2 different ways.
1. With a combination of VLOOKUP& WEEKDAY functions.
2. With a combination of CHOOSE & WEEKDAY functions.
Vlookup looks up a value in the selected range of cells in the left-most column & returns the value in the same row in the index-number position.
lookup_value: The value you want to look for
table_array: The table of data contains information from which you want to return the output. Table array should contain at least two columns of data. The first column contains the lookup values. These values can be text, numbers, or logical values.
col_index_num: It contains the data from which you want the information.
range_lookup: Range lookup is a logical value which instructs Vlookup to find an exact or approximate match.The table must be sorted in ascending order. Choices are true or false.
True for Approximate match
False for Exact match
WEEKDAY: It returns a number from 1 to 7 identifying the day of the week of a date
serial_number: This represents the date of the day that you want to find.
return_type: This is optional. A number that determines the type of return value.
Choose: Returns the character specified by the code number from the character set for your computer. CHOOSE function will return a value from a list of values based on a given index number. Choose function uses index_num to return a value from a list.
index_num: It specifies which value argument is selected. Index_num must be a number between 1 and 254 or a formula that contains number between 1 and 254. If index_num is less than 1 then Choose will return #VALUE! error.
value1 & value 2 are 1 to 254 value arguments from which CHOOSE will evaluate & return the result.
Let us understand with an example:
We have some dates in column A
Result using Vlookup & Weekday function
In cell B3, the formula would be =VLOOKUP(WEEKDAY(A3,2),$F$3:$G$9,2)
Result using Choose & Weekday function
In cell C3, the formula is =CHOOSE(WEEKDAY(A3,2),”Monday”,”Tuesday”,”Wednesday”,”Thursday”,”Friday”,”Saturday”,”Sunday”)
In this way, you can get the day of the week from date in different ways.