[Resolved] Applying a formula to a highlighted region
I hope this makes sense. I'd like to write code to apply the round function to each cell in a user selected region. For example if i highlight with my mouse from A1 to C3 i want all of those cells to be rounded. I found some code in here that uses hard coded values for the region, but that's not exactly what i'm looking for.
I thought i could do it like this:
Dim CellValue As Double
For Each c In ActiveSheet.CurrentRegion.Cells
CellValue = ActiveCell.Value
ActiveCell.Value = Round(CellValue, 0)
Next
But it only rounds the first Cell in the region.
Thanks