Hi guys,
How can I get the following result with the code that follows?
1
2
3
Instead of:
3
3
3
Result For each column...
How can I get the following result with the code that follows?
1
2
3
Instead of:
3
3
3
Result For each column...
Code:
Option Explicit
Const Rng1 = "A"
Const Rng2 = "B"
Const Rng3 = "C"
Const Str1 = "1"
Const Str2 = "2"
Const Str3 = "3"
Sub LoopArrTest()
Dim i As Integer
Dim Rng, Str As Variant
For i = 1 To 3
For Each Rng In Array(Rng1, Rng2, Rng3)
For Each Str In Array(Str1, Str2, Str3)
Range(Rng & i) = Str
Next Str
Next Rng
Next i
End Sub