Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Extracting numbers from alphanumeric strings

SSHRC856-2004-0033 Bielawski
SSHRC858-20-0027Nadasdi
SSHRC858-04-0001Daveluy
SSHRC856-04-010 Blair,H
SSHRC421-2005-03 Haggerty
SSHRC861-2005-025 Garvin

For e.g from above information is in Cell A, I want to have only no. like
from ISt 856-2004-0033, Could it possible by signle line formula.

Thanks in advance

Poonam
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 461
Default Extracting numbers from alphanumeric strings

Try going to Data---Text-to-Columns

Click on Fixed Width and move the line between the letters and where the
numbers start. Then click finish.


"Poonam" wrote:

SSHRC856-2004-0033 Bielawski
SSHRC858-20-0027Nadasdi
SSHRC858-04-0001Daveluy
SSHRC856-04-010 Blair,H
SSHRC421-2005-03 Haggerty
SSHRC861-2005-025 Garvin

For e.g from above information is in Cell A, I want to have only no. like
from ISt 856-2004-0033, Could it possible by signle line formula.

Thanks in advance

Poonam

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 329
Default Extracting numbers from alphanumeric strings

Hi Poonam

Assuming all your strings start with 5 letters and the number strings are always followed by a space:
=MID(A1,6,FIND(" ",A1)-6)
would work for a string in A1.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Poonam" wrote in message ...
SSHRC856-2004-0033 Bielawski
SSHRC858-20-0027Nadasdi
SSHRC858-04-0001Daveluy
SSHRC856-04-010 Blair,H
SSHRC421-2005-03 Haggerty
SSHRC861-2005-025 Garvin

For e.g from above information is in Cell A, I want to have only no. like
from ISt 856-2004-0033, Could it possible by signle line formula.

Thanks in advance

Poonam

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Extracting numbers from alphanumeric strings

Try this based on the following assumptions:

There is *always* 2 hyphens in the cell and the hyphens are *always* part of
the number string.

The number string *always* starts at the 6th character.

Enter this array formula** :

=MID(A1,6,COUNT(--MID(A1,ROW(INDIRECT("6:100")),1))+2)


--
Biff
Microsoft Excel MVP


"Poonam" wrote in message
...
SSHRC856-2004-0033 Bielawski
SSHRC858-20-0027Nadasdi
SSHRC858-04-0001Daveluy
SSHRC856-04-010 Blair,H
SSHRC421-2005-03 Haggerty
SSHRC861-2005-025 Garvin

For e.g from above information is in Cell A, I want to have only no. like
from ISt 856-2004-0033, Could it possible by signle line formula.

Thanks in advance

Poonam



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Extracting numbers from alphanumeric strings

On Fri, 4 Apr 2008 14:41:00 -0700, Poonam
wrote:

SSHRC856-2004-0033 Bielawski
SSHRC858-20-0027Nadasdi
SSHRC858-04-0001Daveluy
SSHRC856-04-010 Blair,H
SSHRC421-2005-03 Haggerty
SSHRC861-2005-025 Garvin

For e.g from above information is in Cell A, I want to have only no. like
from ISt 856-2004-0033, Could it possible by signle line formula.

Thanks in advance

Poonam


This will return all the numbers and hyphens beginning with the first digit and
ending with the first character that is not a digit or hyphen:

=TRIM(MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&" 0123456789")),MIN(SEARCH(
{"a","b","c","d","e","f","g","h","i","j","k","l"," m","n","o","p","q","r","s","t","u","v","w","x","y" ,"z"},
A1&"abcdefghijklmnopqrstuvwxyz",MIN(SEARCH({0,1,2, 3,4,5,6,7,8,9},
A1&"0123456789"))))-MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")) ))

--ron


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 329
Default Extracting numbers from alphanumeric strings

Hi Poonam,

Here's a more flexible formula to strip out all leading and trailing non-numerics from a cell:
=MID(A1,MIN(IF(ISNUMBER((--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))),(ROW(INDIR ECT("1:"&LEN(A1)))),"")),MAX(IF(ISNUMBER((--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))),(ROW(INDIR ECT("1:"&LEN(A1)))),""))-MIN(IF(ISNUMBER((--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))),(ROW(INDIR ECT("1:"&LEN(A1)))),""))+1)
This is an array formula, so you input it with Ctrl-Shift-Enter, after which it will ben enclosed in a pair of braces (ie '{}').

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"macropod" wrote in message ...
Hi Poonam

Assuming all your strings start with 5 letters and the number strings are always followed by a space:
=MID(A1,6,FIND(" ",A1)-6)
would work for a string in A1.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Poonam" wrote in message ...
SSHRC856-2004-0033 Bielawski
SSHRC858-20-0027Nadasdi
SSHRC858-04-0001Daveluy
SSHRC856-04-010 Blair,H
SSHRC421-2005-03 Haggerty
SSHRC861-2005-025 Garvin

For e.g from above information is in Cell A, I want to have only no. like from ISt 856-2004-0033, Could it possible by signle
line formula.

Thanks in advance

Poonam


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
separating numbers from a alphanumeric cell Igneshwara reddy[_2_] Excel Worksheet Functions 3 March 12th 07 08:13 PM
extracting numbers from alphanumeric cells Mary Excel Worksheet Functions 6 February 22nd 07 12:04 PM
how to extract decimal numbers from alphanumeric strings in Excel Old Tone Excel Discussion (Misc queries) 13 March 23rd 06 03:49 PM
Sorting alphanumeric numbers maurice.centner Excel Discussion (Misc queries) 2 May 6th 05 02:00 AM
2 more questions about extracting numbers from text strings andy from maine Excel Discussion (Misc queries) 0 March 28th 05 09:47 PM


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

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

About Us

"It's about Microsoft Excel"