だから、これはずっと前のことだと思います...しかし、オンラインで同様のソリューションを探していました。
私のプログラミング スキルの以前の履歴 (原文のまま): 私は Python から始めました。Python には という便利なツールがありListます。VBA にはこれがないので、残っているのは、sample以下で呼び出した変数に入力できるもの、つまりsample = [1,4,5].
小さなコードに戻ります。holderあなたが指定した方法でグループ化する必要があるため、数字のグループのみを含むようにしました。
Dim count, count1 As Integer
Dim holder As String
Dim sample, smallSample As String
count = 0
count1 = 1
sample = "1ab33 efa 123 adfije-23423 123124-23423"
holder = ""
Do While count <> Len(sample)
    smallSample = Left(sample, 1)
    If smallSample = "0" Or smallSample = "1" Or smallSample = "2" Or smallSample = "3" Or smallSample = "4" Or smallSample = "5" Or smallSample = "6" Or smallSample = "7" Or smallSample = "8" Or smallSample = "9" Then
        holder = holder & smallSample
    Else
        If holder <> "" Then
            Cells(count1,1) = holder
            count1 = count1 + 1
        End If
        holder = ""
    End If
    sample = Right(sample, Len(sample) - 1)
Loop
私が得た出力は
1
33
123
23423
123124
コードを実行した後。