Part II of my last post (somewhat of a different topic but same type of issue)
I'm working with a spreadsheet that is not removing decimals consistently. If I cut and paste data of varying decimal places. Some cells are removing the decimals, others are not.
I thought I had it remedied with
, but I'm sadly mistaken.
Can I use .NumberFormat to not include decimals?
THANKS!
Phil
I'm working with a spreadsheet that is not removing decimals consistently. If I cut and paste data of varying decimal places. Some cells are removing the decimals, others are not.
I thought I had it remedied with
Code:
dataSheet.Cells(tmpRow, tmpCol).NumberFormat = "General"
Can I use .NumberFormat to not include decimals?
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 " & [COLOR=black]Round(Val(dataArray(tmpRow, tmpCol)), 0))[/COLOR]
dataSheet.Cells(tmpRow, tmpCol).Value = Val(WorksheetFunction.Round(Val(dataArray(tmpRow, tmpCol)), 0))
dataSheet.Cells(tmpRow, tmpCol).NumberFormat = "General"
End If
THANKS!
Phil