Sponsored Link

Sponsored Link

Wednesday, October 15, 2008

Find Day name in Excel

During this post we will try to find out methods to find Enclosed below are Four ways to find day name in Excel. Last one is easiest and very useful. During first way we will also attempt to write a VBA code which is a user define function.

1. Using VBA/User define function.

Public Function DayName(iDate As Date) As String
Day (iDate)

Select Case Weekday(iDate)
Case 1
DayName = "Sunday"
Case 2
DayName = "Monday"
Case 3
DayName = "Tuesday"
Case 4
DayName = "Wednesday"
Case 5
DayName = "Thursday"
Case 6
DayName = "Friday"
Case 7
DayName = "Saturday"
End Select

End Function

Enclosed at the bottom of post is example file with all three methods. To view code of user define function, press Alt + F11 key.

2. Using Lookup function.
Please look at the image below
Formula : = LOOKUP(WEEKDAY(A2), {1,2,3,4,5,6,7},{"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"})

2. Using Choose function.
Please look at the image below


Formula : =CHOOSE(WEEKDAY(A2),"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
2. Using Text function.
Please look at the image below


Formula: = Text(A2, "DDDD")

Note: this is one method suggested to me via comment. Hence I always appreciate comments. Also, you can subscribe via email.

Click here to download example

We assure you knowledge, not SPAM!


vinu said...

Hi Sarfaraz,,

Thanks for opening this blog.. Its very useful. This is regarding your message: find day name in excel - As per my view the very easy way to get the day name is below. write a date in A1 cell and write a below formula in next cell - =text(weekday(A1),"dddd")

Pls let me know if it doesnot work.


Post a Comment