MID A STRING - STARTING POINT IS DEFINED BY THE NUM_CHAR IS UNDEFINED.

vishrajv

New Member
Joined
Sep 2, 2022
Messages
3
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
  2. MacOS
  3. Mobile
Hi All,
I am new to MRExcel and this is my 1st Post. I am looking for a help regarding a mid function.
For example :- EBA//92X:RATE:0.99999A://92X:RATE:0.667766B://92X:RATE:9898.18544444A://
I want to extract 0.0667766 in this example but the number can be different for other cases.

I open for formula or vba.

Please help me solve this :)🙏
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Will the value you want ALWAYS be located between the 2nd and 3rd double-slash marks (//) like shown in your single example?
 
Upvote 0
Using 365 and its fresh TEXTBEFORE and TEXTAFTER, if the original text is in A2:
Excel Formula:
=TEXTBEFORE(TEXTAFTER(A2,"RATE:",2),"B://")

For the other versions:
Excel Formula:
=TRIM(MID(SUBSTITUTE(SUBSTITUTE(A2,"RATE:",REPT(" ",100)),"B://",REPT(" ",100)),200,100))

If they don't do the job then please answer Rick's questions (see above)
 
Upvote 0
value will always ending with ://
That does not help given that all your values end with ://. Your original question says you are trying to find one specific value, but are you actually saying that you want to retrieve all of the values that end that way?
 
Upvote 0
Will the value you want ALWAYS be located between the 2nd and 3rd double-slash marks (//) like shown in your single example?

That does not help given that all your values end with ://. Your original question says you are trying to find one specific value, but are you actually saying that you want to retrieve all of the values that end that way?
every value start with :// so i can assume that the value
That does not help given that all your values end with ://. Your original question says you are trying to find one specific value, but are you actually saying that you want to retrieve all of the values that end that way?
num_char in simple logic should be the next : after my mid
 
Upvote 0
What you want is still not clear. Here is your example...

EBA//92X:RATE:0.99999A://92X:RATE:0.667766B://92X:RATE:9898.18544444A://

Originally, you said you wanted the one I highlighted in red. Now you are saying you want the "next : after my mid". What "mid" are you referring to? I am trying to determine if you only want the red highlighted number or if you want that one and the two blue ones also. If you only want the red one, I am trying to understand how you determine that is the one you want. My original question basically asked if you wanted the second number after the colon :)). So, please clarify what it is that you want.
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,975
Members
449,095
Latest member
Mr Hughes

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