Tevfik_Kursun
Altın Üye
- Katılım
- 30 Temmuz 2012
- Mesajlar
- 3,903
- Excel Vers. ve Dili
- Office 2016 Pro - Türkçe 64 Bit
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub test1()
With CreateObject("Vbscript.Regexp")
.Pattern = "\d"
.Global = True
al = Range("B1").Value
If .Test(al) Then
sut = 4
For Each mtch In .Execute(al)
Cells(1, sut).Value = Val(mtch)
sut = sut + 1
Next
End If
End With
End Sub
Sub test2()
With CreateObject("Vbscript.Regexp")
.Pattern = """\w"":\s(\d)"
.Global = True
al = Range("B1").Value
If .Test(al) Then
sut = 4
For Each mtch In .Execute(al)
Cells(1, sut).Value = mtch.submatches(0)
sut = sut + 1
Next
End If
End With
End Sub
Option Explicit
Sub Test()
Dim My_Text As String, My_Data As Variant, X As Byte, Y As Byte
My_Text = Range("B1").Text
My_Data = Split(Replace(My_Text, ":", ","), ",")
Range("A2").Resize((UBound(My_Data) + 1) / 2, 2).ClearContents
Y = 2
For X = LBound(My_Data) To UBound(My_Data) Step 2
Cells(Y, 1) = My_Data(X)
Cells(Y, 2) = My_Data(X + 1)
Y = Y + 1
Next X
End Sub