Hello,
I am trying to compare columns B through J in in two excel spreadsheets (they are in the same workbook).
I want column K from the first sheet to display true if every column on the first spreadsheet contains the same numerical value as to every column on the second spreadsheet.
This is my code:
Function EQUALVALUES(ParamArray Variance() As Double, ParamArray BV() As Double) As Boolean
'this function compares every in 1 row of cells to every value in another of the same length
Dim i As Integer
For i = LBound(Variance) To UBound(Variance)
'loop through the cells in the range Variance
If Variance(i) = BV(i) Then
'Compares the current index of the Variance array to the current index of the BV array
EQUALVALUES = True
Else
EQUALVALUES = False
Exit For
End If
Next i
End Function
I call the function with =EQUALVALUES(B2:J2, Sheet2!B2:J2)
I get a #NAME? error when I call the function.
Is there something wrong with the function or can it just not see the function for some reason?
Bookmarks