Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Does anyone know of an efficient way to separate letters and numbers
which exist in one cell into different cells for each respective part? It has been suggested to me that there should be a way to do this in Excel. I'm using Excel 2000. Thanks Everyone! mtbakerstu |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
It can be done, but the solution you use will depend on the layout of
the data, how the alphas and numerics are mixed in the string. Please post some representative examples. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Enter these two UDF's in a Standard module:
Public Function GetTextPart(c) As String Dim i As Integer Dim MyString As String 'Templatebuilder 'Returning text value from string' MyString = "" For i = 1 To Len(c) If InStr(1, "abcdefghijklmnopqrstuvwxyz -[]", Mid(c, i, 1), vbTextCompare) 0 Then MyString = MyString + Mid(c, i, 1) End If Next i GetTextPart = MyString End Function Public Function GetNumPart(c) As String Dim i As Integer Dim MyString As String 'Templatebuilder 'Returning numeric value from string' MyString = "" For i = 1 To Len(c) If InStr(1, "0123456789", Mid(c, i, 1), vbTextCompare) 0 Then MyString = MyString + Mid(c, i, 1) End If Next i GetNumPart = MyString End Function "mtbakerstu" wrote: Does anyone know of an efficient way to separate letters and numbers which exist in one cell into different cells for each respective part? It has been suggested to me that there should be a way to do this in Excel. I'm using Excel 2000. Thanks Everyone! mtbakerstu |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Dave, here are some examples:
129A 44A 44A 44A VXA44AG 44A VXB180 169 169 169 D129 |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Are the numbers always together like in your example and not like 44A55B66?
If so this somewhat ugly array formula will work =--MID(A1,MATCH(FALSE,ISERROR(--MID(A1,ROW(INDIRECT("1:100")),1)),0),100-SUM(--ISERROR(--MID(A1,ROW(INDIRECT("1:100")),1)))) entered with ctrl + shift & enter another one by Domenic I believe =LOOKUP(9.99999999999999E+307,--MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"012345 6789")),ROW(INDEX(A:A,1):INDEX(A:A,LEN(A1))))) then to get the text just use =SUBSTITUTE(A1,B1,"") where B1 is the cell with any of the formulas -- Regards, Peo Sjoblom http://nwexcelsolutions.com "mtbakerstu" wrote in message oups.com... Thanks Dave, here are some examples: 129A 44A 44A 44A VXA44AG 44A VXB180 169 169 169 D129 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I count alpha codes in a range of cells in a row? | Excel Discussion (Misc queries) | |||
smart tags and stock updates | Excel Discussion (Misc queries) | |||
Person Names Smart Tag problems | Excel Discussion (Misc queries) | |||
smart tags | Excel Discussion (Misc queries) | |||
Adding Smart Tags to an unrecognized cell reference | Excel Discussion (Misc queries) |