Ads 468x60px

Monday, August 26, 2013

Sort by Birthday [Quick tip]


Sorting dates on day and month alone - Excel tipsLets start the week with a quick tip.
Lets say you have a list of employees and their birthdays. Now you want to sort this list, based on their birthday, not age.How would you do it?
Sorting by day and month alone:
  1. Add a column next to original dates. Lets call this Birthday.
  2. Then, calculate birthday in current year for everyone.
  3. Assuming DOB is in B1, Formula for birthday (in current year) would be,=DATE(YEAR(TODAY()),MONTH(B2),DAY(B2))
  4. This formula gives you a date which has same year as TODAY(), same month & day as original date.
  5. Then, fill down the formula for all rows.
  6. Now sort this new column (Birthday) in chronological order.
  7. You are done!
Employee table sorted on birthday - Excel tips
Note: if you are using tables, then use this formula.
(Assuming original date is in DOB column),
=DATE(YEAR(TODAY()), MONTH([@DOB]),DAY([@DOB]))
Related: Introduction to Tables & Structural References.
More Sorting Examples:
Homework for you:
If you think sorting by birthdays is easier than eating a birthday cake, then I have a challenge for you. Assuming a list of data of births is in the range A1:A100, write a formula to find how many birthdays are in this month?

0 comments:

Post a Comment