Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I retrieve 6 digits from within my concatenated numbers?

I have a list of numbers which are separated by hyphens. The format and length is always the same. Example:

65-09-27-542400-6147

I want to retrieve the 6 digits from after the third hyphen. Using the data in the above example, the result is:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

542400

My formula can only retrieve the numbers from after the first hyphen. Using above example, this will be 09:

=IFERROR(MID(A1,SEARCH("-*-",A1)+1,SEARCH("-",SUBSTITUTE(A1,"-","^",1))-SEARCH("-*-",A1)-1),"")

How can I adjust my current formula to retrieve the 6 digits after the third hyphen instead?

>Solution :

I think the easiest and most efficient is to use the MID function if they are all the exact format:

=mid(A1,10,6)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading