Collective Mr. Excel Brain,
I'm trying to come up with code to remove decimals points in a couple columns of a spreadsheet.
The spreadsheet that I inherited uses dataArray's... What I'd like to do is somehow remove the decimal points in a couple of columns (M and N).
I thought using a similar method to the below method would work (after the number has been rounded), but I'm not having much luck.
Any suggestions?
YOUR HELP IS GREATLY APPRECIATED!
I'm trying to come up with code to remove decimals points in a couple columns of a spreadsheet.
The spreadsheet that I inherited uses dataArray's... What I'd like to do is somehow remove the decimal points in a couple of columns (M and N).
I thought using a similar method to the below method would work (after the number has been rounded), but I'm not having much luck.
Code:
[COLOR=red][SIZE=3][FONT=Calibri]If Val(dataArray(tmpRow, tmpCol)) <> Val(Round(Val(dataArray(tmpRow, tmpCol)), 0)) Then<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>[/FONT][/SIZE][/COLOR]
[COLOR=red][SIZE=3][FONT=Calibri] cellWarning = True<o:p></o:p>[/FONT][/SIZE][/COLOR]
[COLOR=red][SIZE=3][FONT=Calibri] Call updateWarnText(tmpRow, tmpCol, "The location # was changed from " & dataArray(tmpRow, tmpCol) & " to " & Round(Val(dataArray(tmpRow, tmpCol)), 0))<o:p></o:p>[/FONT][/SIZE][/COLOR]
[COLOR=red][SIZE=3][FONT=Calibri] dataSheet.Cells(tmpRow, tmpCol).Value = Val(Round(Val(dataArray(tmpRow, tmpCol)), 0))<o:p></o:p>[/FONT][/SIZE][/COLOR]
[COLOR=red][SIZE=3][FONT=Calibri] End If[/FONT][/SIZE][/COLOR]<o:p></o:p>
Any suggestions?
YOUR HELP IS GREATLY APPRECIATED!