Excel: Formula Extract Characters at the Beginning of a String


Hello I need to extract the numbers at the beginning of a string. The problem is that there could 1, 2 or 3 digits. Here are examples of the string: 4JXXXXXXXXX1204 10EXXXXXXXXX1204 127JXXXXXXXXX1204 I only want to extract the 4, 10 and the 127 in the above strings. I tried =LEFT(B1,LEN(B1)-14), but the formula isn't working on the last string where the number is 3 digits. it only pulls 12, instead of 127. Thanks


This question generated 56 answers. To proceed to the answers, click here.

This thread is current as of May 22, 2014.


For more resources for Microsoft Excel