V
vsoler
I am missing something...
A zero value eventually shows in the spreadsheet as zero.
Let me explain: my Function has a Range (a vertical vector) as a
parameter. The range may contain empty cells. The range is then
converted to a Variant that contains an array. The function puts all
the Null (empty) values at the bottom of the array. Till here
everything is fine.
But in the spreadsheet, instead of empty cells I see zeroes, which is
wrong. What am I missing?
Function Igual2(Rng As Range) As Variant
Dim Vector() As Variant
Dim i As Integer, j As Integer
Vector = Rng.Value
i = UBound(Vector, 1)
ReDim Preserve Vector(1 To i, 1 To 2)
For j = 1 To i
Vector(j, 2) = j
Next j
Vector = NullsAtTheBottom(Vector)
....
Igual2 = Vector
End Function
A zero value eventually shows in the spreadsheet as zero.
Let me explain: my Function has a Range (a vertical vector) as a
parameter. The range may contain empty cells. The range is then
converted to a Variant that contains an array. The function puts all
the Null (empty) values at the bottom of the array. Till here
everything is fine.
But in the spreadsheet, instead of empty cells I see zeroes, which is
wrong. What am I missing?
Function Igual2(Rng As Range) As Variant
Dim Vector() As Variant
Dim i As Integer, j As Integer
Vector = Rng.Value
i = UBound(Vector, 1)
ReDim Preserve Vector(1 To i, 1 To 2)
For j = 1 To i
Vector(j, 2) = j
Next j
Vector = NullsAtTheBottom(Vector)
....
Igual2 = Vector
End Function