Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
data shown as below
a b 1 5.2312 6.1231 2 15.2323 15.46463 How can I add a round() formula to every cell without doing that to each of them seprately? thanks, |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Select the cells you want to convert and run this macro:
Sub round_um() Set rr = Selection For Each r In Selection r.Formula = "=ROUND(" & r.Value & ",0)" Next End Sub -- Gary''s Student - gsnu200798 "Eastar" wrote: data shown as below a b 1 5.2312 6.1231 2 15.2323 15.46463 How can I add a round() formula to every cell without doing that to each of them seprately? thanks, |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you Gary, this works.
by the way, can we do this without macro? thanks, "Gary''s Student" wrote: Select the cells you want to convert and run this macro: Sub round_um() Set rr = Selection For Each r In Selection r.Formula = "=ROUND(" & r.Value & ",0)" Next End Sub -- Gary''s Student - gsnu200798 "Eastar" wrote: data shown as below a b 1 5.2312 6.1231 2 15.2323 15.46463 How can I add a round() formula to every cell without doing that to each of them seprately? thanks, |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can do it by manual typing, but that's a huge in in the a$$. Using the
macro is not too bad: Macros are very easy to install and use: 1. ALT-F11 brings up the VBE window 2. ALT-I ALT-M opens a fresh module 3. paste the stuff in and close the VBE window If you save the workbook, the macro will be saved with it. To use the macro from the normal Excel window: 1. ALT-F8 2. Select the macro 3. Touch Run To remove the macro: 1. bring up the VBE window as above 2. clear the code out 3. close the VBE window To learn more about macros in general, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Gary''s Student - gsnu200798 "Eastar" wrote: Thank you Gary, this works. by the way, can we do this without macro? thanks, "Gary''s Student" wrote: Select the cells you want to convert and run this macro: Sub round_um() Set rr = Selection For Each r In Selection r.Formula = "=ROUND(" & r.Value & ",0)" Next End Sub -- Gary''s Student - gsnu200798 "Eastar" wrote: data shown as below a b 1 5.2312 6.1231 2 15.2323 15.46463 How can I add a round() formula to every cell without doing that to each of them seprately? thanks, |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you very much Gary. That is great!
"Gary''s Student" wrote: You can do it by manual typing, but that's a huge in in the a$$. Using the macro is not too bad: Macros are very easy to install and use: 1. ALT-F11 brings up the VBE window 2. ALT-I ALT-M opens a fresh module 3. paste the stuff in and close the VBE window If you save the workbook, the macro will be saved with it. To use the macro from the normal Excel window: 1. ALT-F8 2. Select the macro 3. Touch Run To remove the macro: 1. bring up the VBE window as above 2. clear the code out 3. close the VBE window To learn more about macros in general, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Gary''s Student - gsnu200798 "Eastar" wrote: Thank you Gary, this works. by the way, can we do this without macro? thanks, "Gary''s Student" wrote: Select the cells you want to convert and run this macro: Sub round_um() Set rr = Selection For Each r In Selection r.Formula = "=ROUND(" & r.Value & ",0)" Next End Sub -- Gary''s Student - gsnu200798 "Eastar" wrote: data shown as below a b 1 5.2312 6.1231 2 15.2323 15.46463 How can I add a round() formula to every cell without doing that to each of them seprately? thanks, |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Using another column as a helper.
Assuming numbers are in column A and column B as shown In C1 enter =ROUND(A1,0) copy to D1 Select C1 and D1 then Double-click to copy down. Gord Dibben MS Excel MVP On Thu, 7 Aug 2008 12:45:01 -0700, Eastar wrote: Thank you Gary, this works. by the way, can we do this without macro? thanks, "Gary''s Student" wrote: Select the cells you want to convert and run this macro: Sub round_um() Set rr = Selection For Each r In Selection r.Formula = "=ROUND(" & r.Value & ",0)" Next End Sub -- Gary''s Student - gsnu200798 "Eastar" wrote: data shown as below a b 1 5.2312 6.1231 2 15.2323 15.46463 How can I add a round() formula to every cell without doing that to each of them seprately? thanks, |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I notice that when the below rounding macro is used on a formula instead of a
number, it converts the formula to its calculated number. Is there a macro that will add the +ROUND() to cells while preserving the formula within the cell? Thanks in advance for your help! "Gary''s Student" wrote: Select the cells you want to convert and run this macro: Sub round_um() Set rr = Selection For Each r In Selection r.Formula = "=ROUND(" & r.Value & ",0)" Next End Sub -- Gary''s Student - gsnu200798 "Eastar" wrote: data shown as below a b 1 5.2312 6.1231 2 15.2323 15.46463 How can I add a round() formula to every cell without doing that to each of them seprately? thanks, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sum Formula for cell range | Excel Discussion (Misc queries) | |||
How can I make a blank cell in a formula cell with a range of cell | Excel Discussion (Misc queries) | |||
VBA for Last Cell in Formula Range | Excel Discussion (Misc queries) | |||
Need a formula that finds the last used cell in a range | Excel Worksheet Functions | |||
formula for named cell/range using cell values | Excel Worksheet Functions |