G
Guest
Hello experts,
I am a beginner at writing VBA so I could really use some help.
Objective: I'm trying to write a program that will round the selected
numbers to 2 decimal places. I am well aware of the =ROUND command but I'd
like to simplify my work. Ideally, I'd like to highlight a range of one cell
or a range of many cells, select my macro button for "Round to two decimal
places," and then see all my selected numbers rounded to two decimal places.
My use of the =ROUND command is taking too much time.
My current script is giving me a circular reference error which I understand
from my code, I'm just not sure how to fix it. Additionally, my code is only
for rounding one cell whereas I'd also like to have my macro have the ability
to round a range of selected cells.
My current code with circular reference error: ActiveCell.FormulaR1C1 =
"=ROUND(R[0]C[0],2)"
Any suggestions? Thanks in advance for your help.
-Scott
I am a beginner at writing VBA so I could really use some help.
Objective: I'm trying to write a program that will round the selected
numbers to 2 decimal places. I am well aware of the =ROUND command but I'd
like to simplify my work. Ideally, I'd like to highlight a range of one cell
or a range of many cells, select my macro button for "Round to two decimal
places," and then see all my selected numbers rounded to two decimal places.
My use of the =ROUND command is taking too much time.
My current script is giving me a circular reference error which I understand
from my code, I'm just not sure how to fix it. Additionally, my code is only
for rounding one cell whereas I'd also like to have my macro have the ability
to round a range of selected cells.
My current code with circular reference error: ActiveCell.FormulaR1C1 =
"=ROUND(R[0]C[0],2)"
Any suggestions? Thanks in advance for your help.
-Scott