View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim[_55_] Jim[_55_] is offline
external usenet poster
 
Posts: 8
Default Extract 2, 3, 4 or 5-digit number from string

I have a list of URLs where some contain the parameter "categoryid="
with either a 2, 3, 4, or 5 digit number. I need to extract that
number, as an integer, into a neighboring column. I need a routine or
function to help with this - something along the line of making the mid
function smart enough to recognize numbers and adjust the length value
so it only takes the numbers. And if it doesn't find "categoryid",
then leave the cell blank.

TIA,
Jim