Techcrium
Techcrium

Reputation: 57

Using Excel, how do I extract the date from a string?

DEC 4 DEC 5 SPORT LIFE $31.49

DEC 25 DEC 28 BESTBUY EGIFTCARD 877-850-1977 $35.00

I want to have columns 2 as:

DEC 4

DEC 25

Column 3 as:

DEC 5

DEC 28

Edit: I have uploaded the image. I want to somehow achieve column B and C. Notice that sometimes date is DEC 4 or could be DEC 14. (Ignore the period. I did that to quickly not have auto format)

And yes, date is always first 2 groups.

Upvotes: 0

Views: 49

Answers (1)

Scott Craner
Scott Craner

Reputation: 152450

Put this in B1 and copy over one column and down the length of the data:

=TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",99)),(COLUMN(A:A)-1)*198+1,198))

enter image description here

Upvotes: 1

Related Questions