Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default seperate number and character in a cell


ex)
in case A1 = aaa893
B1 = aaa
C1 = 893

in case A2 = 12daa893
B2 = daa
C2 = 12893

how to make function ????

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default seperate number and character in a cell

Maybe easiest to write a UDF

Function GetNumeric(rng As Range)
Dim i As Long
Dim sTemp As String

If rng.Count 1 Then
GetNumeric = CVErr(xlErrRef)
Else
For i = 1 To Len(rng.Value)
If IsNumeric(Mid(rng.Value, i, 1)) Then
sTemp = sTemp & Mid(rng.Value, i, 1)
End If
Next i
GetNumeric = sTemp
End If
End Function


--

HTH

RP
(remove nothere from the email address if mailing direct)


"a rohi" wrote in message
...

ex)
in case A1 = aaa893
B1 = aaa
C1 = 893

in case A2 = 12daa893
B2 = daa
C2 = 12893

how to make function ????

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



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
How can I seperate text and number from alphanumeric cell? Jennifer Medina Excel Worksheet Functions 3 November 15th 07 11:27 PM
Seperate digits of a number in a cell by columns and back Mar Nighbor Excel Discussion (Misc queries) 2 August 17th 07 02:56 AM
How do I seperate a 10 digit number into one cell for each number? Tkriger Excel Discussion (Misc queries) 2 January 26th 07 04:29 PM
Number of character in one cell. Aom Excel Worksheet Functions 1 April 25th 06 05:03 AM
Character and number in a cell - Can you help? Woo Excel Programming 4 November 15th 04 09:29 PM


All times are GMT +1. The time now is 08:23 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"