hello guys i'm trying to compare two columns but the problem is that when the value is double i can't compare it;
if the value is string then i can work normal with it but if it's double the programme stop working telling me that it had problems converting double to object can you please suggest me how to solve this problem.
in my columns i have values like cell 1 :2235
cell2 2685
cell 3 D2568
cell 4 E695
cell 5 3256
so i can't compare the value that is double to a value that is string
P.S i only added the part of the program where the problem is .
Code:Dim findme1 As Excel.Range = ws1.Range("A4:A" & Range1.Rows.Count) Dim findme2 As Excel.Range = ws2.Range("F5:F" & Range2.Rows.Count) Dim MyArray As Object(,) = CType(findme1.Value, Object(,)) Dim MyArrayy As Object(,) = CType(findme2.Value, Object(,)) for n=1 to MyArray.length for m=1 to MyArrayy.length if MyArray(n,1)=MyArrayy(m,1) then ' can't convert string to doubt .... end if next m next n




Reply With Quote
