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 ///
[TABLE="width: 274"]
<colgroup><col width="365" style="width: 274pt; mso-width-source: userset; mso-width-alt: 13348;"> <tbody>[TR]
[TD="width: 365, bgcolor: transparent"] 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.

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

[/TD]
[/TR]
</tbody>[/TABLE]

[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
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,224,823
Messages
6,181,181
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