How Do I Extract Text After Charecter and String?

L

Legacy 286866

Guest
Kind of lost on what to do here. I have a a cell in A2 that is in the format shown below. I need to extract all text after Query Summery - and to end at the ============ beffore Query. All it should pull through is New event testing in area 15. I have mutiple entries like this in the A column but in the same format. Not a clue on how I would extract this.

============
Main Data - Information on this is the main data
============
Query Summery - New event testing in area 15
============
Query - New mine created for testing in minecraft and brought forwards 15 times today
============
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Kind of lost on what to do here. I have a a cell in A2 that is in the format shown below. I need to extract all text after Query Summery - and to end at the ============ beffore Query. All it should pull through is New event testing in area 15. I have mutiple entries like this in the A column but in the same format. Not a clue on how I would extract this.

============
Main Data - Information on this is the main data
============
Query Summery - New event testing in area 15
============
Query - New mine created for testing in minecraft and brought forwards 15 times today
============
Give this a try...

=MID(A1,SEARCH("Query Summery",A1)+16,SEARCH("==",A1,SEARCH("Query Summery",A1)+1)-SEARCH("Query Summery",A1)-17)


SIDE NOTE: I think you have spelled "Summery" incorrectly for how you are using it, although it might be correct depending on where you live and local spelling rules. Here in the US, "summery" is an adjective meaning "fit for summer" whereas the word I think you want is "summary" meaning "covering the main points in a concise manner".
 
Upvote 0
So the cells value is one long string like
"============Main Data - Information on this is the main data============Query Summery - New event testing in area 15============Query - New mine created for testing in minecraft and brought forwards 15 times today============"?

formula
Code:
=MID(LEFT(A2,FIND("============Query - ",A2,1)-1), FIND("Query Summery - ",A2,1)+16,LEN(A2))


if using VBA I'd use split() via the ============


Edit:
What Rick said :P
Got sidetracked...
 
Upvote 0
Ah yes I did spell that wrong Rick. Well spotted ^_^. I edited what you wrote above and made it a bit smaller. Seems to do the trick.
<code>=MID(LEFT(A2,FIND("Query - ",A2)-16),FIND("Query Summery - ", A2)+16,999)</code>
 
Upvote 0

Forum statistics

Threads
1,215,580
Messages
6,125,654
Members
449,245
Latest member
PatrickL

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