Assume your Invoice number in A2, in B2
=TEXT(TEXT(--("20"&MID(A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"01 23456789")),4)&"01"),"0000\/00\/00")+0,"mmm yy")
Assume your Invoice number in A2, in B2
=TEXT(TEXT(--("20"&MID(A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"01 23456789")),4)&"01"),"0000\/00\/00")+0,"mmm yy")
Cheers !
Excel Range to BBCode Table
Use Social Networking Tools If You Like the Answers !
Message to Cross Posters
@ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)
Here is a similar formula that is eight characters and one fuction call less than the formula you posted..
=TEXT(0+(20&REPLACE(MID(A1,MIN(FIND({0,1,2,3,4,5,6 ,7,8,9},A1&"0123456789")),4),3,0,"-")&"-01"),"mmm yy")
I would note, though, that one could put this even shorter formula in the cell (saves another 15 characters and one more function call)...
=0+(20&REPLACE(MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8, 9},A1&"0123456789")),4),3,0,"-")&"-01")
and simply Custom Format the cells using "mmm yy" (without the quote marks, of course)... doing it that way, the cells will contain real dates, instead of Text that looks like a date, and which can be used directly in other formulas if need be.
Last edited by Rick Rothstein; 05-23-2015 at 09:06 AM.
Bookmarks