• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Formatting the year to just be the last 2 numbers

Im_Offset

Member
How can I get the output of a cell to be just the last 2 numbers of the year?

For Example: Cell A1 has the formula =today()
If I put in cell A2, =year(A1) the result is 2016.

How can I get the output to just be 16 ? A formula that will output the answer as text is fine.

Thanks!
 
Thanks Naresh. that formula is great. But when I try the formula that Chihiro suggested the result is "05". Why is that?

Anyone know???
 
Can you upload the workbook where my formula returns "05"? The formula will return "16" as long as this year's date value is stored in A1 (i.e. Today()).
 
Ah, you entered =TEXT(YEAR(B1),"yy")
You don't need YEAR(B1) part. Just enter =TEXT(B1,"yy")

By nesting YEAR(B1) formula becomes =TEXT(2016, "yy")
2016 is taken as Date value (not year) by TEXT function.
Which is interpreted as 7/8/1905, thus returning "05".
 
Back
Top