|
だいぶ変わりましたね。
Sub test()
Dim rng As Range, r As Range, c As Range, txt As String
Dim i As Integer, n As Integer, j As Integer, x As Integer
With Sheets("sheet1")
Set rng = .Range("a2", .Cells(.Rows.Count, "a").End(xlUp)).Resize(, 5)
End With
For Each r In rng
If r.Column = 1 Then
Set c = Sheets("sheet2").Range("g6").Offset(n)
c = r
n = n + 10: j = 0
ElseIf Not IsEmpty(r) Then
txt = Replace(r.Text, "-", "△")
txt = Replace(txt, ",", "") '<-- カンマも必要なら削除
x = Len(txt)
With c.Offset(j, 9)
For i = 1 To x
.Offset(, -(x - i)) = Mid(txt, i, 1)
Next
End With
j = j + 1
Else
j = j + 1
End If
Next
End Sub
|
|