View Single Post
 
Old 04-05-2019, 12:00 PM
14spar15 14spar15 is offline Windows 7 64bit Office 2010 64bit
Advanced Beginner
 
Join Date: Mar 2011
Posts: 97
14spar15 is on a distinguished road
Default Formula to extract last two letters from each word

Hello, I have a cell that has a list of years (example 1999 2000 2001 2002 2003 2004) and I need a formula to change this example into (99 00 01 02 03 04). There may be anywhere from one year up to 20 years in this cell. I found this

Code:
=LEFT(A1,1)&MID(A1,FIND(" ",A1&" ",1)+1,1)&MID(A1&"  ",FIND(" ",A1&"  ",FIND(" ",A1&" ",1)+1)+1,1)
that I was going to modify (It uses first letter of each word) but I am finding out it is only going to work for up to 3 years. I guess I could draw it out to 20 words/numbers but it seems there is probably a better way. Any ideals here? Thank-You
Reply With Quote