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

Hi,
with thanks from Bob,Rick,Ron and Suleman , I think I did not ask my
question clearly . let I write it again as an example :
cell include reply cell
including formula
___ __________ _____
____________ ________
A1 MR FRANK (25687) -- B1
25687 ?
A2 MR FRANK 256875787 -- B2 256875787
?
A3 MR FRANK (256875) AT2008/2/6 -- B3 256875
?
A4 MR FRANK 2560 IN U.S -- B4 2560
?
A5 25602MR FRANK -- B5
25602 ?

please send for me the correct formulas that I shoude use in the cells from
B1 to B5 till I can get the above replies.

thank you,
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default separating numbers from text

Hi,

You got an answer from Bob Phillips that does precisely what you want. Have
another look.

http://www.microsoft.com/office/comm...a-4d4a2563aa93

Mike

"SIAMAK" wrote:

Hi,
with thanks from Bob,Rick,Ron and Suleman , I think I did not ask my
question clearly . let I write it again as an example :
cell include reply cell
including formula
___ __________ _____
____________ ________
A1 MR FRANK (25687) -- B1
25687 ?
A2 MR FRANK 256875787 -- B2 256875787
?
A3 MR FRANK (256875) AT2008/2/6 -- B3 256875
?
A4 MR FRANK 2560 IN U.S -- B4 2560
?
A5 25602MR FRANK -- B5
25602 ?

please send for me the correct formulas that I shoude use in the cells from
B1 to B5 till I can get the above replies.

thank you,

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default separating numbers from text

On Fri, 18 Jul 2008 21:25:01 -0700, SIAMAK
wrote:

Hi,
with thanks from Bob,Rick,Ron and Suleman , I think I did not ask my
question clearly . let I write it again as an example :
cell include reply cell
including formula
___ __________ _____
____________ ________
A1 MR FRANK (25687) -- B1
25687 ?
A2 MR FRANK 256875787 -- B2 256875787
?
A3 MR FRANK (256875) AT2008/2/6 -- B3 256875
?
A4 MR FRANK 2560 IN U.S -- B4 2560
?
A5 25602MR FRANK -- B5
25602 ?

please send for me the correct formulas that I shoude use in the cells from
B1 to B5 till I can get the above replies.

thank you,


Yes, asking your question clearly is important in obtaining the help you wish.

It's still not entirely clear, but it appears that you wish to extract the
first series of digits in each string.

I have also assumed that the A1, A2, etc at the beginning of each string are
cell references and not part of the string.

That being the case, you could use this UDF:

=ExtrFirstNum(A1)

with this code entered as befo

============================
Option Explicit
Function ExtrFirstNum(str As String)
Dim re As Object, mc As Object
Set re = CreateObject("vbscript.regexp")
re.Global = False
re.Pattern = "\d+"
If re.test(str) = True Then
Set mc = re.Execute(str)
ExtrFirstNum = mc(0)
End If
End Function
==============================
--ron
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 Text From Numbers Santi[_2_] Excel Discussion (Misc queries) 2 January 16th 08 02:11 PM
separating numbers from a alphanumeric cell Igneshwara reddy[_2_] Excel Worksheet Functions 3 March 12th 07 08:13 PM
separating +ve and -ve numbers into two columns Prospect Excel Discussion (Misc queries) 3 December 12th 06 12:47 PM
Help - Separating numbers appearing on the right of a text string Faz1 Excel Worksheet Functions 3 December 14th 05 02:38 PM
Separating Numbers Himu Excel Worksheet Functions 7 June 2nd 05 05:20 AM


All times are GMT +1. The time now is 08:41 PM.

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"