extract text from an entire string

MAP

Active Member
Joined
Mar 22, 2007
Messages
315
Office Version
  1. 2007
Platform
  1. Windows
Excel experts, I have checked other posts related to extracting text, but I am not able to understand how I can implement that to my needs.

In column A, I have 2,000 rows of the text string that resembles the following:
"07/16 07/14 1234 WM SUPERCENTER #1234 HOUSTON TX $5.99"

A) The first five characters will need to be extracted to column D as a date formatted as mm/yy
B) the second set of five characters after the space will need to be extracted to column E as a date formatted as mm/yy
C) the 4-digit numbers are not used
D) the description will be a variable length that ends before the "$" ... this needs to be extracted to column F
E) the dollar value can be of variable length after the "$" which needs to be extracted to column G and formatted as currency

I am using Excel 2003 and I am not familiar with macros. What formula can you experts offer to help me with my challenge?

Your assistance will be appreciated. Thank you/
 
Ok, another one of those moments...:eeek::banghead:

So, between all the suggested formulas posted above, MAP should be able to resolve his issue, hopefully...
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
To jtakw, and to my respected mentors, Peter_SSs and Rick Rothstein.

your recent suggestions worked. I thank you immensely for your assistance.

one item to note, however... the dates mentioned in my example are mm/dd (i incorrectly wrote mm/yy)... How do I instruct Excel to treat the these five characters as mm/dd in the year of 2018?
"07/16 07/14 1234 WM SUPERCENTER #1234 HOUSTON TX $5.99"
 
Last edited:
Upvote 0
one item to note, however... the dates mentioned in my example are mm/dd (i incorrectly wrote mm/yy)... How do I instruct Excel to treat the these five characters as mm/dd in the year of 2018?
Try using these formula for cells D1 and E1 (use the ones you already have for cells F1 and G1)...

D1: =0+(LEFT(A1,5)&"/2018")

E1: =0+(MID(A1,7,5)&"/2018")
 
Upvote 0
Rick Rothstein, I am grateful for your assistance. I reiterate my appreciation to Peter_SSs and jtakw

Thank you all for helping me
 
Upvote 0
You're quite welcome MAP, glad you got it all sorted out. :)
 
Upvote 0
To jtakw, and to my respected mentors, Peter_SSs and Rick Rothstein.

your recent suggestions worked. I thank you immensely for your assistance.

one item to note, however... the dates mentioned in my example are mm/dd (i incorrectly wrote mm/yy)... How do I instruct Excel to treat the these five characters as mm/dd in the year of 2018?
"07/16 07/14 1234 WM SUPERCENTER #1234 HOUSTON TX $5.99"
You are welcome.

Thinking more about the dates, with the columns formatted appropriately, wouldn't you only need these?

=LEFT(A1,5)+0
=MID(A1,7,5)+0
 
Upvote 0
Thinking more about the dates, with the columns formatted appropriately, wouldn't you only need these?

=LEFT(A1,5)+0
=MID(A1,7,5)+0
I think it would depend if next year it would be alright for those cells to report the same dates but with the year 2019 instead of 2018 or not.
 
Upvote 0
I think it would depend if next year it would be alright for those cells to report the same dates but with the year 2019 instead of 2018 or not.
Correct. My guess was that "current year" was required as I figured if the formula was still being used in 5 years, the dates would probably have moved on from 2018. I've been wrong plenty of times before so one more won't matter. :)
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top