R robert cohen Feb 22, 2004 #1 Is there a macro that can be used to round, say to 2 decimal places, number of highlighted cells, say a column
Is there a macro that can be used to round, say to 2 decimal places, number of highlighted cells, say a column
F Frank Kabel Feb 23, 2004 #2 Hi you may try the following code: sub foo() dim rng as range dim c as range set rng = selection for each c in selection if IsNumeric (c.value) then c.value = Round(c.value,2) end if next end sub Highlight your column and invoke this macro
Hi you may try the following code: sub foo() dim rng as range dim c as range set rng = selection for each c in selection if IsNumeric (c.value) then c.value = Round(c.value,2) end if next end sub Highlight your column and invoke this macro