I am populating an array (2 dimension) manually using VBA code. i would like to duplicate the last row array. see below my code but I would like to know other one line code if any for this...
Set userange = Range("mytable")
For i = 1 To 14
For y = 1 To 30
IF userange(i,2).value = "NOSHOW" THEN
'Duplicate the previous array row (Is There any one line code to duplicate the last row of array instead of using FOR Next Loop)
For z=1 to 30
Array(i,z) = MyArray (i-1, z).value
Next
EXIT FOR
ELSE
MyArray(i, y) = userange (i, y).value
ENDIF
Next
Next