Hi Forum,
I don't understand the code below, wondering if you could help explain it to me?

1) What is the code looping?
2) What is the value of UBound(brr, 2) and UBound(arr)?
3) in Cells(s, 3).Resize(x, 1) = arr(i, 1), what does the = arr(i, 1) do?
4) in Cells(s, 8).Resize(x, 1) = Application.Transpose(Application.Index(brr, 1, 0)), what does = Application.Transpose(Application.Index(brr, 1, 0)) do?
Thanks a lot,
Christina
I don't understand the code below, wondering if you could help explain it to me?


1) What is the code looping?
2) What is the value of UBound(brr, 2) and UBound(arr)?
3) in Cells(s, 3).Resize(x, 1) = arr(i, 1), what does the = arr(i, 1) do?
4) in Cells(s, 8).Resize(x, 1) = Application.Transpose(Application.Index(brr, 1, 0)), what does = Application.Transpose(Application.Index(brr, 1, 0)) do?
Thanks a lot,
Christina
Code:
(Just a note)
'Row=17; Col=BC
With Sheets("Assist")
arr = .Range("b5:b" & Row)
brr = .Range("d2:" & Col & Row)
crr = .Range("c5:c" & Row)
End With
If Row > 5 Then
s = 28: x = UBound(brr, 2)
For i = 1 To UBound(arr)
Cells(s, 3).Resize(x, 1) = arr(i, 1)
Cells(s, 4).Resize(x, 1) = crr(i, 1)
Cells(s, 8).Resize(x, 1) = Application.Transpose(Application.Index(brr, 1, 0))
Cells(s, 9).Resize(x, 1) = Application.Transpose(Application.Index(brr, 2, 0))
Cells(s, 10).Resize(x, 1) = Application.Transpose(Application.Index(brr, 3, 0))
Cells(s, 17).Resize(x, 1) = Application.Transpose(Application.Index(brr, i + 3, 0))
s = s + x
Next i
End If