Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Happy to hear that.
Thanks for the feedback. On Tue, 23 Jan 2007 11:50:01 -0800, J@Y wrote: Great thanks, works like a charm. "Gord Dibben" wrote: JY Sub RoundAdd() Dim myStr As String Dim cel As Range For Each cel In Selection If cel.HasFormula = True Then If Not cel.Formula Like "=ROUND(*" Then myStr = Right(cel.Formula, Len(cel.Formula) - 1) cel.Value = "=ROUND(" & myStr & "," & "2" & ")" End If End If Next End Sub Change the "2" to whatever suits you before running the macro. If not familiar with VBA and macros, see David McRitchie's site for more on "getting started". http://www.mvps.org/dmcritchie/excel/getstarted.htm In the meantime.......... First...create a backup copy of your original workbook. To create a General Module, hit ALT + F11 to open the Visual Basic Editor. Hit CRTL + r to open Project Explorer. Find your workbook/project and select it. Right-click and InsertModule. Paste the code in there. Save the workbook and hit ALT + Q to return to your workbook. Run the macro by going to ToolMacroMacros. You can also assign this macro to a button or a shortcut key combo. Gord Dibben MS Excel MVP On Mon, 22 Jan 2007 13:29:02 -0800, J@Y wrote: If I have a column of numbers, and I want to put =round() function on all of them, is there a way to do it so that I am not creating another column with reference to the existing column of numbers? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
List of functions contained in the add-ins, esp. Analysis Toolpak | Excel Worksheet Functions | |||
adding multiple cells together | Excel Discussion (Misc queries) | |||
Adding up multiple cells | Excel Worksheet Functions | |||
IF function....testing against values in multiple cells | Excel Worksheet Functions | |||
Adding an accumulator for multiple cells | Excel Worksheet Functions |