Dayname (English Version)
Criteria: Technical, Multiple Formulas
Level: Intermediate
I myself often face this problem. That is, what is the dayname of certain date. Before found this multiple formulas from my partner job, Michael HTj, I always use macro. What a stupid way! Thx Mike! Now, I want to share how to get dayname of certain date.
There are two ways to have it:
.: Using format cell
1 Right click on selected range
2 Chose Format Cells...
3 In Number tab, chose Custom
4 Type ddd or dddd in Type textbox
5 To see the result, see in Sample box
6 OK
.: Using TEXT formula
TEXT(value, format_text)
Value is a numeric value, a formula that evaluates to a numeric value, or a reference to a cell containing a numeric value.
Format_text is a number format in text form from in the Category box on the Number tab in the Format Cells dialog box. Format_text cannot contain an asterisk (*) and cannot be the General number format.
For this case, set format_text to ddd for simple day (e.g. Sun) or dddd for complete day (e.g. Sunday)
Here are the formulas in cells of C3 and D3:
=TEXT(B3,"ddd")
=TEXT(B3,"dddd")
respectively.
Level: Intermediate
I myself often face this problem. That is, what is the dayname of certain date. Before found this multiple formulas from my partner job, Michael HTj, I always use macro. What a stupid way! Thx Mike! Now, I want to share how to get dayname of certain date.
There are two ways to have it:
.: Using format cell
1 Right click on selected range
2 Chose Format Cells...
3 In Number tab, chose Custom
4 Type ddd or dddd in Type textbox
5 To see the result, see in Sample box
6 OK
.: Using TEXT formula
TEXT(value, format_text)
Value is a numeric value, a formula that evaluates to a numeric value, or a reference to a cell containing a numeric value.
Format_text is a number format in text form from in the Category box on the Number tab in the Format Cells dialog box. Format_text cannot contain an asterisk (*) and cannot be the General number format.
For this case, set format_text to ddd for simple day (e.g. Sun) or dddd for complete day (e.g. Sunday)
Here are the formulas in cells of C3 and D3:
=TEXT(B3,"ddd")
=TEXT(B3,"dddd")
respectively.
0 Comments:
Post a Comment
<< Home