Extract strings between "." and "~?" characters to new column

MrToad

New Member
Joined
Apr 11, 2013
Messages
2
I have a column that contains cells with a text string of varying lengths. I want to extract the text that occur between the characters "." and "~?". Essentially, pull out all of the characters that occur after a period and before a question mark. The number of characters between "." and "~?" can be of any length and occur anywhere in the larger string, and may occur more than once.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Like this


Excel 2010
AB
1Test String to. Extract Data ?Extract Data
2Another .String to extract but different length ?String to extract but different length
3Hi. My name? is John SmithMy name
Sheet1
Cell Formulas
RangeFormula
B1=TRIM(MID(SUBSTITUTE(A1,"?",REPT(" ",999)),FIND(".",A1)+1,999))
 
Upvote 0
So this looks like I get everything prior to the question mark. I was hoping to limit the characters returned to only those that precede the question mark until reaching the period.
 
Upvote 0
This will give you everything after the period and before the question mark, as you stated in your orignal post?
 
Upvote 0

Forum statistics

Threads
1,213,515
Messages
6,114,080
Members
448,548
Latest member
harryls

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