Supposing I have cell value equal to
"2020 Aug ABC"
in Excel.
I want to convert this to 202008
date format using an excel formula because I would want to use the output value, that is, 202008 to perform some operation.
If your data is in A1
:
=LEFT(A1,4) & TEXT((DATEVALUE(MID(A1,6,3) & " 1")),"mm")
Just another approach if your data is always same pattern.
=TEXT(DATEVALUE("01-"&MID(A1,6,3)&"-"&LEFT(A1,4)),"yyyymm")
A1 = 2020 Aug ABC
B1
=LOOKUP(9^9,LEFT(A1,4)/1%+FIND(TEXT(ROW($1:$12)*28,"mmm"),A1)^0*ROW($1:$8))
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.