I posted a question a few weeks ago and a solution was found and some great code was written by JBeaucaire and others. I now just need to enhance the maco a little and have the result prefixed with a '
Sub RoundSelection()
'Select a range and then run the macro
Dim Cell As Range, RNG As Range
Set RNG = Selection.SpecialCells(xlCellTypeConstants)
For Each Cell In RNG
If IsNumeric(Cell.Value) Then Cell.Value = Evaluate("ROUND(" & Cell & ",2)")
Next Cell
End Sub
The macro works just fine and rounds a number to 2 decimal places but I need the resulting numberto be prefixed with a '
Eg at the moment
100.5346666 would become 100.53 and what i want to do is have it '100.53
I had tried the following
If IsNumeric(Cell.Value) Then Cell.Value = Evaluate(""'"("ROUND(" & Cell & ",2)")")
But with out any luck
So Any help on this issue would be great ;-)
Bookmarks