Requirement: To extract the first 6 characters of the number . For example, if you have a text string as per below where the number in the end always is 12 characters long. But the rest of the string can vary in length. A formula is required that extract the first 6 characters of the number in the end, so the result should be 060519.
40647-Access-Kim the kid-060519210519
=MID(A1;FIND(CHAR(1);SUBSTITUTE(A1;"-";CHAR(1);3))+1;6)
=LEFT(RIGHT(A1,12),6)
Obtained from the OzGrid Help Forum.
Solution provided by Desavu and Niraj.
See also: Index to Excel VBA Code and Index to Excel Freebies and Lesson 1 - Excel Fundamentals and Index to how to… providing a range of solutions and Index to new resources and reference sheets
See also:
How to COUNTIF using input cell as range depth |
How to use COUNT |
How to use SUMPRODUCT and COUNT question for unique associations |
How to use COUNTIF to see if a customer is a repeat customer |
How to work with COUNTIF with multiple criteria |
How to use Index/Countif based on multiple factors including range |
How to count the frequency of a specific number on a specific day |
How to count non blanks 5 years from the last non blank date |
Click here to visit our Free 24/7 Excel/VBA Help Forum where there are thousands of posts you can get information from, or you can join the Forum and post your own questions.