Hey everyone,
I'm looking to round a selected range of cells but the code seems to be taking a really long time to run. I'm hoping someone can help me improve what I've written:
I've seen other posts related to this before but they were always specific to a range. Is it possible to convert my selection to a non-contiguous range, and then run it on that range or would that run at the same speed? Or is there a better way to perform the task?
Thanks in advance.
I'm looking to round a selected range of cells but the code seems to be taking a really long time to run. I'm hoping someone can help me improve what I've written:
Code:
Selection.SpecialCells(xlCellTypeVisible).Select
For Each cell In Selection
cell.Value = WorksheetFunction.Round(cell.Value, 2)
On Error Resume Next
Next
I've seen other posts related to this before but they were always specific to a range. Is it possible to convert my selection to a non-contiguous range, and then run it on that range or would that run at the same speed? Or is there a better way to perform the task?
Thanks in advance.