Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
Is there a way I can write a formula to give me the data 12 from the left or 11 from the left?<o></o>
<o></o>
I currently download streams of data that have numerous digits, but it is only the first 11 or 12 that I am interested in for coding. <o></o>
<o></o>
The data is separated by an hyphen, and I currently have to use the formula =LEFT(T4,12) for 12 digit numbers which then have a hyphen after it, and then find the items that have 11 digits and then a hyphen, and I use =LEFT(T5,11).<o></o>
<o> </o>
I.e. 0100-0001DCA-PL1091 and 3605-0001WC-2<o></o>
<o> </o>
This, however, takes a very long time, as there are thousands of lines, and they are all mixed in to one another.<o></o>
<o> </o>
Is there a formula I can write so it can give me 11 or 12 digits depending on where the hyphen appears<o></o>
<o> </o>
Thanks.<o></o>
<o></o>
<o></o>
Is there a way I can write a formula to give me the data 12 from the left or 11 from the left?<o></o>
<o></o>
I currently download streams of data that have numerous digits, but it is only the first 11 or 12 that I am interested in for coding. <o></o>
<o></o>
The data is separated by an hyphen, and I currently have to use the formula =LEFT(T4,12) for 12 digit numbers which then have a hyphen after it, and then find the items that have 11 digits and then a hyphen, and I use =LEFT(T5,11).<o></o>
<o> </o>
I.e. 0100-0001DCA-PL1091 and 3605-0001WC-2<o></o>
<o> </o>
This, however, takes a very long time, as there are thousands of lines, and they are all mixed in to one another.<o></o>
<o> </o>
Is there a formula I can write so it can give me 11 or 12 digits depending on where the hyphen appears<o></o>
<o> </o>
Thanks.<o></o>
<o></o>