Problem – How to sort birthdays by month (2 solutions)
I
have the list of employees and their birthdays.
This
list should be sorted by month, which is not possible with Excel’s built-in function.
Solution 1 (using MONTH and DAY
functions)
1.
In cells A2:B14 there is a list of employees and their birthdays.
2. Select cells
C2:C14 and type the following formula:
=MONTH(B2)*100+DAY(B2).
3. Press
<Ctrl+Enter>.
4. Sort your data on
this column.
5.
Format the column as General to display serial values rather than
dates.
Solution 2 (using TEXT function)
1.
Insert new column C.
2.
Select cells D2:D14 and type the following formula:
=TEXT(B2,"MMDD")
+ 0
3.
Press <Ctrl+Enter>.
4.
Sort your data on this column.
5.
Format the column as General to display serial values rather than
dates.
No comments:
Post a Comment