Extrapolate text from string (MID? COUNTIF?)

Polsy84

New Member
Joined
Apr 14, 2014
Messages
2
Office Version
  1. 2021
Platform
  1. MacOS
Hey guys,



Looking to get some input on the attached example sheet.

I'm needing to do an audit and need to compare differing sheets. I have the others down, but this one is proving tricky.


Cell A2 has the below text;

Phone Number Portin Order Need to Process, Order Id is 2021120619502743472;"12947247";"1.00000000000000000000"


I'm needing to extrapolate that number (2021120619502743472) from that string. Now, I'd normally do a '=LEFT' if the string were consistent, this one is not. As you can see from the A3 string.

**CANCELLED**CRD 12/17/21**Phone Number Portin Order Need to Process, Order Id is 2021121415491701717;"13002398";"1.00000000000000000000"


Example XLS

Is there something out that where I could have it search for a keyword, say 'Order Id is' (as that never changes) and then output the next 19/20 characters?

Keen to get your thoughts on this one.



Thanks all!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

How about
Excel Formula:
=REPLACE(LEFT(A2,FIND(";",A2)-1),1,SEARCH("Order id",A2)+11,"")
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

How about
Excel Formula:
=REPLACE(LEFT(A2,FIND(";",A2)-1),1,SEARCH("Order id",A2)+11,"")
Bah! Sorry about that, good shout. Updated now.

Mate! That looks to have worked a treat! Honestly, its sexy!

Thank you so much, you've saved me hours here.
 
Upvote 0
Glad to help & thanks for the feedback.
Thanks also for updating your profile.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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