Sub test()
Dim c As Integer
Dim r As Integer
Dim i As Integer
r = 1
For r = 1 To 100
i = 5 + Sheet1.Cells(r, 3).Value
For c = 5 To i
Sheet1.Cells(r, c).Value = Sheet1.Cells(r, 1).Value & " " & Sheet1.Cells(r, 2).Value
Next
Next
End Sub
Sub test()
Dim c As Integer
Dim r As Integer
Dim i As Integer
r = 1
For r = 1 To 100
i = 5 + Sheet1.Cells(r, 3).Value
For c = 5 To i - 1 'โทษทีครับตอนรันก็ลืมดู แก้ให้แล้วนะครับ
Sheet1.Cells(r, c).Value = Sheet1.Cells(r, 1).Value & " " & Sheet1.Cells(r, 2).Value
Next
Next
End Sub
Sub Test()
Dim c As Integer
Dim r As Integer
Dim i As Integer
r = 1
Worksheets.Add().Name = "Worksheets_" & Worksheets.count + 1 //ให้ไปอยู่ใน Worksheets อื่นซะเลย 5555
For r = 1 To 100
i = 5 + Sheet1.Cells(r, 3).Value
For c = 5 To i - 1 'â·É·Õ¤ÃѺµÍ¹Ãѹ¡çÅ×Á´Ù á¡éãËéáÅéǹФÃѺ
Worksheets("Worksheets_" & Worksheets.count).Cells(r, c).Value = Sheet1.Cells(r, 1).Value & " " & Sheet1.Cells(r, 2).Value
Next
Next
Sub test()
Dim c As Integer
Dim r As Integer
Dim i As Integer
r = 1
เคลีย
For r = 1 To 100
i = 5 + 500
For c = 5 To i - 1
Sheet1.Cells(r, c).Value = ""
Next
Next
เพิ่ม
For r = 1 To 100
i = 5 + Sheet1.Cells(r, 3).Value
For c = 5 To i - 1
Sheet1.Cells(r, c).Value = Sheet1.Cells(r, 1).Value & " " & Sheet1.Cells(r, 2).Value
Next
Next
End Sub