Home |
Search |
Today's Posts |
#12
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Tue, 05 Sep 2006 21:11:27 -0400, Ron Rosenfeld
wrote: I missed one. What do you want returned for: 5054-SUA-US I'm assuming you want a blank. If that is the case, change the formula to: =REGEX.MID(A1,"(?<=\D)\d+",-1) The following should be more "robust" depending on what you want. It's rule is that it will return the last set of digits in the string only if they are NOT followed by other alphanumeric characters. =REGEX.MID(A1,"\d+(?!.*\w)",-1) So this formula will return a null string ("") given: 5054-123-US The first formula: =REGEX.MID(A1,"(?<=\D)\d+",-1) will return "123" --ron |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Extract portion of cell contents | Excel Worksheet Functions | |||
Extract portion of a cell | Excel Discussion (Misc queries) | |||
Extract a specific portion of text as new cell value | Excel Discussion (Misc queries) | |||
Extract portion of formula resident in a cell | Excel Worksheet Functions | |||
I need to search for then extract a specific portion of cell data... | Excel Worksheet Functions |