Building a Custom WeekdayName Function in Excel

Have you ever struggled finding the weekday name in Excel? Now, with the Advanced Formula Environment you can build a custom function that you can use repeatedly, just like a native one, to get the weekday name of any Date as input.

You can copy and paste the code below into your Advanced Formula Environment to replicate the function.

WeekdayName = LAMBDA(Date,
LET(
    Weekday, WEEKDAY(Date),
    WeekdayName, SWITCH(Weekday,1, "SUN",2,"MON",3,"TUE",4,"WED",5,"THU",6,"FRI",7,"SAT"),
    WeekdayName
)
);

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply