I'm working with a spreadsheet that is not rounding consistently. If I cut and paste 1.5 it rounds to 2 (which is correct, .5 should round to 1). However, if I cut and paste .5, it rounds to 0.
Any insight....WOULD BE GREATLY APPRECIATED...I'm fresh out of ideas!
Any insight....WOULD BE GREATLY APPRECIATED...I'm fresh out of ideas!
Code:
If Val(dataArray(tmpRow, tmpCol)) <> Val(WorksheetFunction.Round(Val(dataArray(tmpRow, tmpCol)), 0)) Then
cellWarning = True
Call updateWarnText(tmpRow, tmpCol, "Number of Levels, was changed from " & dataArray(tmpRow, tmpCol) & " to " & [B][COLOR=red]Round(Val(dataArray(tmpRow, tmpCol)), 0))[/COLOR][/B]
dataSheet.Cells(tmpRow, tmpCol).Value = Val(WorksheetFunction.Round(Val(dataArray(tmpRow, tmpCol)), 0))
dataSheet.Cells(tmpRow, tmpCol).NumberFormat = "General"
End If