Add a Column to Show Month or Weekday
June 21, 2022 - by Bill Jelen
![Add a Column to Show Month or Weekday Add a Column to Show Month or Weekday](/img/excel-tips/2022/06/add-a-column-to-show-month-or-weekday.jpg)
Problem: I want to analyze sales by weekday. Can I calculate the weekday from a date?
Strategy: Use the TEXT
function. The first argument for this function is a cell containing a date. The second argument is any custom number format in quotes. =TEXT(A2,”DDDD”)
will give you a weekday. =TEXT(A2,”MMM”)
will give you the month abbreviation.
![To get the weekday name from a date, use =TEXT(A2,"DDDD")](/img/content/2022/06/LE10000547.jpg)
Note that unlike applying a date format, the TEXT
function actually converts the date to text. You can sort by column B and all of the Mondays will sort together.
This article is an excerpt from Power Excel With MrExcel
Title photo by Jesse Bauer on Unsplash