Thread: Text function
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default Text function

"nc" wrote:
I have an extract from a long list below.


If the first number is always the first 6 characters followed by at least
one character (e.g. space), and if the second number is always 4 characters,
then:

=--MID(A1, MIN(FIND({1,2,3,4,5,6,7,8,9,0}, A1&"1234567890", 8)), 4)

This returns a numeric result; format with a desired number format, if
necessary. Omit "--" if you want a text result; format with a desired
horizontal alignment, if necessary.


----- original message -----

"nc" wrote in message
...
I have an extract from a long list below. I would like to strip out the
second number from each text. i.e example from the first two rows are 1000
and 3104 respectively. Any help would be greatly appreciated.

010114 Long K 1000 Basic Pay
042140 Balard S 3104 FLS AD Hrs
040557 Sanjay Conroy A 3001 Fee
042316 Christie Eron C 1006 Basic Arrs
020674 De Thang C 1104 Basic-FLS
040203 De La Conjo MF 1000 Basic Pay
020025 Van Wanjo E 1010 Lon All'ce
040471 Van Kot FWM 1102 Basic-FLC
040471 Van Kot FWM 1112 L.A. - FLC