# This is the input table for which I want to perform some action는 #Vba에서 For 루프의 변수 증가?
Public Sub mac()
Dim RangeOfChild As Range
For i = 1 To 10000
ActiveCell.Range("A" & i).Activate
Dim DirArray As Variant
Dim temp As Variant
Set RangeOfChild = Range(ActiveCell.Offset(0, 1),ActiveCell.End(xlToRight))
childCount = RangeOfChild.count
temp = ActiveCell.Value
ActiveCell = Null
DirArray = RangeOfChild.Value
RangeOfChild.ClearContents
ActiveCell.EntireRow.Resize(childCount - 1).Insert Shift:=xlDown
ActiveCell.Value = temp
Range(ActiveCell.Offset(0, 1), ActiveCell.Offset(RangeOfChild.count - 1, 1)) = Application.Transpose(Array(DirArray))
i = i + (childCount)
Next i
End Sub
나는 아래 이미지
하지만 루프에 대한 기록은 남아 있지, 행의 두 가지로 작업을하고있는에 유사한 출력을 원하는 누군가가 이것으로 나를 도울 수 있다면 큰 도움이 될 것입니다.
ActiveCell.Range 변경 '("A"및 i)는 .Activate''I = I '을 범위 ("A"및 I) .Activate''및 'I = I +이 (childCount)를 변경할 + childCount - 1' (그러나 우르두, 그건 일을하는 나쁜 방법입니다!) – YowE3K