#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default Extracting a code

Hi, I have a list of titles that all contain a 6 digit reference ABC123, the
first 3 digits are always the same (ABC) but the second 3 change, they are in
a different places on each line, so the MID function doesn't work.

Is there anyway to =ABC and the 3 digits after it??


thank you

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Extracting a code

Fiona

If I understand correctly you have strings like

qwertyABC999jjnsccjkn

and you want the 999. If so try this

=MID(A1,SEARCH("abc",A1)+3,3)

Mike

"Fiona" wrote:

Hi, I have a list of titles that all contain a 6 digit reference ABC123, the
first 3 digits are always the same (ABC) but the second 3 change, they are in
a different places on each line, so the MID function doesn't work.

Is there anyway to =ABC and the 3 digits after it??


thank you

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default Extracting a code

Thank you Mike, thats exactly what I needed!

"Mike H" wrote:

Fiona

If I understand correctly you have strings like

qwertyABC999jjnsccjkn

and you want the 999. If so try this

=MID(A1,SEARCH("abc",A1)+3,3)

Mike

"Fiona" wrote:

Hi, I have a list of titles that all contain a 6 digit reference ABC123, the
first 3 digits are always the same (ABC) but the second 3 change, they are in
a different places on each line, so the MID function doesn't work.

Is there anyway to =ABC and the 3 digits after it??


thank you

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Extracting a code

Glad I could help

"Fiona" wrote:

Thank you Mike, thats exactly what I needed!

"Mike H" wrote:

Fiona

If I understand correctly you have strings like

qwertyABC999jjnsccjkn

and you want the 999. If so try this

=MID(A1,SEARCH("abc",A1)+3,3)

Mike

"Fiona" wrote:

Hi, I have a list of titles that all contain a 6 digit reference ABC123, the
first 3 digits are always the same (ABC) but the second 3 change, they are in
a different places on each line, so the MID function doesn't work.

Is there anyway to =ABC and the 3 digits after it??


thank you

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default Extracting a code

With the first entry in F1, try these and see if any do what you want
=RIGHT(F1,LEN(F1)-3)
=TRIM(RIGHT(F1,LEN(F1)-3))
=SUBSTITUTE(F1,"ABC","")
=TRIM(SUBSTITUTE(F1,"ABC",""))
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Fiona" wrote in message
...
Hi, I have a list of titles that all contain a 6 digit reference ABC123,
the
first 3 digits are always the same (ABC) but the second 3 change, they are
in
a different places on each line, so the MID function doesn't work.

Is there anyway to =ABC and the 3 digits after it??


thank you





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default Extracting a code

I meant to add: to get numbers not text use the double negation or VALUE
=--RIGHT(F2,LEN(F2)-3)
=VALUE(TRIM(RIGHT(F3,LEN(F3)-3)))

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Fiona" wrote in message
...
Hi, I have a list of titles that all contain a 6 digit reference ABC123,
the
first 3 digits are always the same (ABC) but the second 3 change, they are
in
a different places on each line, so the MID function doesn't work.

Is there anyway to =ABC and the 3 digits after it??


thank you



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA code for Extracting Data but order of columns changes all the Confused Excel Discussion (Misc queries) 3 April 8th 08 05:16 AM
Extracting 1st 3-digits of postal code that begin with 0 Pcakes Excel Worksheet Functions 8 June 22nd 06 11:35 PM
Formula for Extracting Alphabetic Part of a Product Code ob3ron02 Excel Worksheet Functions 5 October 30th 04 12:35 PM
Formula for Extracting Alphabetic Part of a Product Code ob3ron02 Excel Worksheet Functions 1 October 29th 04 07:05 PM
Formula for Extracting Alphabetic Part of a Product Code ob3ron02 Excel Worksheet Functions 1 October 29th 04 06:07 PM


All times are GMT +1. The time now is 01:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"