Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello,
If your data is in column A starting from row 2 then enter into B2: =regexpreplace($A2,"^(\D*)(\d+)(.*)$","$1") C2: =--regexpreplace($A2,"^(\D*)(\d+)(.*)$","$2") D2: =regexpreplace($A2,"^(\D*)(\d+)(.*)$","$3") copy down as far as necessary and sort by columns C, B and D Regards, Bernd PS: [not my invention:] Function RegExpReplace(ByVal SourceString As String, _ ByVal Pattern As String, ByVal ReplaceString As String, _ Optional ByVal IgnoreCase As Boolean = False, _ Optional ByVal GlobalReplace As Boolean = False, _ Optional ByVal MultiLine As Boolean = False) As String Dim objRE As Object Set objRE = CreateObject("vbscript.regexp") objRE.Pattern = Pattern objRE.IgnoreCase = IgnoreCase objRE.Global = GlobalReplace objRE.MultiLine = MultiLine RegExpReplace = objRE.Replace(SourceString, ReplaceString) Set objRE = Nothing End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sort from SQL view does not sort in EXCEL | Excel Discussion (Misc queries) | |||
Does Excel support Alphanumberic formulas? | Excel Worksheet Functions | |||
Custom Format alphanumberic value with spaces | Excel Worksheet Functions | |||
Excel sort by Fill Color by custom list sort | Excel Discussion (Misc queries) | |||
Excel Sort function should not sort the cell formatting! | Excel Worksheet Functions |