Extracting count data from a character string

sbartmasser

New Member
Joined
Mar 19, 2010
Messages
17
I am working too hard manually. Trying to do a string that will give me the character in the middle between two characters.

I need to do a count between / and ///
SA-GLJE//2221196370/93894/// Med -Dental 9-30.

The count varies .

So on this it should return 5. I am currently using mid but having change it manually every time.

=MID(A21,21,5)*0.01
<colgroup><col width="67" style="width: 50pt; mso-width-source: userset; mso-width-alt: 2450;"> <tbody> </tbody>

<colgroup><col width="67" style="width: 50pt; mso-width-source: userset; mso-width-alt: 2450;"> <tbody> </tbody>

<colgroup><col width="365" style="width: 274pt; mso-width-source: userset; mso-width-alt: 13348;"> <tbody> </tbody>
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi,

Is there always precisely one occurrence of a single, double and triple forward slash within the string?
If so, do they always occur in the order double-single-triple?
Is the number whose length is to be counted always less than 10 digits long?

If the answer to all of the above is yes:

=LEN(-LOOKUP(1,-MID(A1,FIND("/",SUBSTITUTE(A1,"//","ζ"))+2,{1,2,3,4,5,6,7,8,9,10})))

Regards
 
Upvote 0
Hi,

If your strings are always in the format of your Single sample, this will also work:


Book1
AB
1SA-GLJE//2221196370/93894/// Med -Dental 9-30.5
Sheet313
Cell Formulas
RangeFormula
B1=FIND("///",A1)-FIND("/",SUBSTITUTE(A1,"//","||"))-1
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,507
Messages
6,125,212
Members
449,214
Latest member
mr_ordinaryboy

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