问题1:Sub 取数字()Set lk = CreateObject("vbscript.regexp")lk.Global = Truelk.Pattern = "[0-9]{1,}"For Each Ln In Range("a1", Cells(Rows.Count, "a").End(xlUp).Address)For Each lp In lk.Execute(Ln)Cells(Ln.Row, "c") = lp.ValueNextNextEnd Sub问题2:Sub 取数字()n = InputBox("请输入需要提取第多少次出现的数字字符串", "提示", vbOKOnly)If VBA.IsNumeric(n) = False ThenMsgBox "输入的不是数字", vbInformation, "错误提示"Exit SubEnd IfSet lk = CreateObject("vbscript.regexp")lk.Global = Truelk.Pattern = "[0-9]{1,}"For Each Ln In Range("a1", Cells(Rows.Count, "a").End(xlUp).Address)For Each lp In lk.Execute(Ln)k = k + 1If k = CInt(n) ThenCells(Ln.Row, "c") = lp.ValueExit SubEnd IfNextNextEnd Sub