Changing the number format of a cell does not (usually) change the actual value of the cell. A few tests I would suggest:I´ve changed A1:A90 to number format and all other numbers in the Excel file to number format as well.
1) in a blank column, put the formula =isnumber(a1) and copy down. TRUE indicates that the "number" in A1 is an actual number. FALSE indicates that the "number" in A1 is a text string that only looks like a number.
2) select a cell from A1:A90 and, in the VBA immediate window, execute a statement like debug.print typename(sheets("...").range("A34").value) and see if it returns double or string or other.
If any of these kind of tests indicate that the values in A1:a90 are text strings rather than numbers, you will need to either convert them to numbers or change your variable type to string.
Bookmarks