Reputation: 89
I have a column which contains values of dates and text with certain file extensions. I split up the file names to 3 different columns, one of them has these dates and text.
Example: 13.04.26.xls(date) or v1.xls(text)
I want a formula to extract 13.04.26 and v1. I tried using "Right" formula but the number count varies as I have two different kinds of text.
Upvotes: 1
Views: 77
Reputation: 1520
Try this
=SUBSTITUTE(LEFT(A1,FIND(".xls",A1)-1),".","-")
Upvotes: 1
Reputation: 19067
Assuming you have 13.04.26.xls
in cell A1 and you want to get correct result to cell B2 just put the following formula in B1:
=MID(A1,1,SEARCH(".xls",A1)-1)
Upvotes: 1