Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
A small data base
A B 1 3.3456 6.3535 2 4.5656 10.3265 Want to set up a macro to round the data,Macro as below Range("d1:e2").Select Selection.Formula = "ROUND(RC[-3],2) The result I got is ROUND(RC[-3],2), instead of numbers (3.35, 6.36 .etc.) thanks |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You need an equals sign within the quotes as well:
Selection.Formula = "=ROUND(RC[-3],2)" -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "Eastar" wrote in message ... A small data base A B 1 3.3456 6.3535 2 4.5656 10.3265 Want to set up a macro to round the data,Macro as below Range("d1:e2").Select Selection.Formula = "ROUND(RC[-3],2) The result I got is ROUND(RC[-3],2), instead of numbers (3.35, 6.36 .etc.) thanks |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How about adding the equal sign and using .formulaR1C1:
Selection.FormulaR1C1 = "=ROUND(RC[-3],2)" Or even: Range("d1:e2").formular1c1 = "=ROUND(RC[-3],2)" (Dropping the .select line) Eastar wrote: A small data base A B 1 3.3456 6.3535 2 4.5656 10.3265 Want to set up a macro to round the data,Macro as below Range("d1:e2").Select Selection.Formula = "ROUND(RC[-3],2) The result I got is ROUND(RC[-3],2), instead of numbers (3.35, 6.36 .etc.) thanks -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you very much, guys
"Dave Peterson" wrote: How about adding the equal sign and using .formulaR1C1: Selection.FormulaR1C1 = "=ROUND(RC[-3],2)" Or even: Range("d1:e2").formular1c1 = "=ROUND(RC[-3],2)" (Dropping the .select line) Eastar wrote: A small data base A B 1 3.3456 6.3535 2 4.5656 10.3265 Want to set up a macro to round the data,Macro as below Range("d1:e2").Select Selection.Formula = "ROUND(RC[-3],2) The result I got is ROUND(RC[-3],2), instead of numbers (3.35, 6.36 .etc.) thanks -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How not to round a formula | Excel Discussion (Misc queries) | |||
Round up Formula Help | Excel Discussion (Misc queries) | |||
How do I NOT round off in a formula | Excel Worksheet Functions | |||
formula to round up? | Excel Worksheet Functions | |||
using a macro round function | New Users to Excel |