Using "mid" between two characters

sroot

New Member
Joined
Dec 19, 2013
Messages
8
I have alot of data i am trying to sort into excel and i think i need to use the mid function just not sure how to type this one out right... Here is my example "Variable PCARD0-V9R 2014-08-05 20140711 69.36" assuming this is in A1 what would i do to get everything from 2014 to the last space (this information can always change but it will always be in between a space and the dollar figure) so for this one i would want in another column 2014-08-05 20140711 Any ideas? Thanks!
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
How about this.
=MID(A1,FIND(" ",A1)+1,(FIND("~",SUBSTITUTE(A1," ","~",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))-FIND(" ",A1))
 
Upvote 0
Sorry, I missed that "Variable" was part of the string. The formula I posted will not start at the correct position as a result.
 
Upvote 0
Try =MID(A1,FIND(" ",A1,FIND(" ",A1)+1)+1,(FIND("~",SUBSTITUTE(A1," ","~",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))-FIND(" ",A1,FIND(" ",A1)+1))
 
Upvote 0
Here's another solution:


Excel 2010
AB
1Variable PCARD0-V9R 2014-08-05 20140711 69.362014-08-05 20140711
Sheet43
Cell Formulas
RangeFormula
B1=LEFT(RIGHT(A1,LEN(A1)-FIND("2014",A1,1)+1),FIND("|",SUBSTITUTE(RIGHT(A1,LEN(A1)-FIND("2014",A1,1)+1)," ","|",2),1)-1)
 
Upvote 0
Disregard my above post. After looking at your request again, I see I mistakenly thought data you wanted to abstract always started with 2014.
 
Upvote 0

Forum statistics

Threads
1,214,798
Messages
6,121,630
Members
449,041
Latest member
Postman24

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