Hi to all,
I have an array like this below, for which I'd like to have a "fill down" like for first 2 columns. I know there is a way in a sheet doing "RANGE(myRng).FillDown",
but how can be done manipulating the VBA array itself? Thanks for any help.
If we see it in tabular form, the array looks like this:
and I'd like the output array to look like this (but without print it to a range):
I have an array like this below, for which I'd like to have a "fill down" like for first 2 columns. I know there is a way in a sheet doing "RANGE(myRng).FillDown",
but how can be done manipulating the VBA array itself? Thanks for any help.
VBA Code:
Dim arr(1 To 11, 1 To 4) As Variant
arr(1, 1) = "ME01": arr(1, 2) = "B": arr(1, 3) = "55": arr(1, 4) = ""
arr(2, 1) = "": arr(2, 2) = "": arr(2, 3) = "51": arr(2, 4) = ""
arr(3, 1) = "": arr(3, 2) = "": arr(3, 3) = "1784": arr(3, 4) = ""
arr(4, 1) = "R03": arr(4, 2) = "KD": arr(4, 3) = "359": arr(4, 4) = ""
arr(5, 1) = "": arr(5, 2) = "": arr(5, 3) = "36": arr(5, 4) = ""
arr(6, 1) = "": arr(6, 2) = "Y": arr(6, 3) = "": arr(6, 4) = "M"
arr(7, 1) = "": arr(7, 2) = "": arr(7, 3) = "": arr(7, 4) = "W"
arr(8, 1) = "": arr(8, 2) = "A": arr(8, 3) = "": arr(8, 4) = "W"
arr(9, 1) = "": arr(9, 2) = "": arr(9, 3) = "": arr(9, 4) = "R"
arr(10, 1) = "": arr(10, 2) = "": arr(10, 3) = "": arr(10, 4) = "E"
arr(11, 1) = "": arr(11, 2) = "": arr(11, 3) = "": arr(11, 4) = "E"
If we see it in tabular form, the array looks like this:
ME01 | B | 55 | |
51 | |||
1784 | |||
R03 | KD | 359 | |
36 | |||
Y | M | ||
W | |||
A | W | ||
R | |||
E | |||
E | |||
and I'd like the output array to look like this (but without print it to a range):
ME01 | B | 55 | |
ME01 | B | 51 | |
ME01 | B | 1784 | |
R03 | KD | 359 | |
R03 | KD | 36 | |
Y | M | ||
Y | W | ||
A | W | ||
A | R | ||
A | E | ||
A | E | ||