Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a column within a list which is made up of numbers
and letters. Most of the time they are in blocks and I can sepearte them using a custom function. However, occassionally numbers are mixed with letters e.g "And24this253". How can I seperate the numbers out of this but keep the same order as they appear? Thank you so much for your help. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You might find something here
http://tinyurl.com/zo6o -- Don Guillett SalesAid Software "Jamal" wrote in message ... I have a column within a list which is made up of numbers and letters. Most of the time they are in blocks and I can sepearte them using a custom function. However, occassionally numbers are mixed with letters e.g "And24this253". How can I seperate the numbers out of this but keep the same order as they appear? Thank you so much for your help. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Wed, 17 Dec 2003 08:33:08 -0800, "Jamal"
wrote: I have a column within a list which is made up of numbers and letters. Most of the time they are in blocks and I can sepearte them using a custom function. However, occassionally numbers are mixed with letters e.g "And24this253". How can I seperate the numbers out of this but keep the same order as they appear? Thank you so much for your help. Well, since this is a programming group, here are two UDF's to accomplish this: ================ Function GetValue(str) Dim N As Integer, i As String i = "" For N = 1 To Len(str) If IsNumeric(Mid(str, N, 1)) Then i = i & Mid(str, N, 1) If Mid(str, N + 1, 1) = "." Then i = i & "." End If Next If i = "" Then GetValue = i Exit Function End If GetValue = CDbl(i) End Function '----------------------- Function GetLtrs(str) As String GetLtrs = "" Dim N As Integer For N = 1 To Len(str) If Not (IsNumeric(Mid(str, N, 1))) Then GetLtrs = GetLtrs & Mid(str, N, 1) Next End Function ============================= --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Custom Formating Letters to Numbers while Displaying Letters | Excel Worksheet Functions | |||
Columns now numbers rather than letters how do i get letters back | Excel Discussion (Misc queries) | |||
Count only Letters in cells that contain both letters and numbers | Excel Worksheet Functions | |||
How do I seperate numbers? | Excel Discussion (Misc queries) | |||
create self-generating numbers with letters and numbers | Excel Discussion (Misc queries) |