Home |
Search |
Today's Posts |
#1
|
|||
|
|||
adding a forumla to cells with formula in them already
I need to add a round command to about 2500 cells and many of them have their own individual formula is there any way to add round to all of them?
I tried selecting them all and using ctrl+enter but that changed all the formulas to the same so that didn't work what I want to end up with is this =round("whats already in this cell",0) |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
adding a forumla to cells with formula in them already
Select the 2500 cells then run this macro.
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 & ",0)" End If End If Next End Sub Gord On Fri, 3 May 2013 13:06:36 +0100, iVassh wrote: I need to add a round command to about 2500 cells and many of them have their own individual formula is there any way to add round to all of them? I tried selecting them all and using ctrl+enter but that changed all the formulas to the same so that didn't work what I want to end up with is this =round("whats already in this cell",0) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding an aditional forumla to this one | Excel Worksheet Functions | |||
Is there an Excel forumla to count different coloured cells? | Excel Discussion (Misc queries) | |||
Forumla works in all cells but 1 | Excel Worksheet Functions | |||
adding row to forumla | Excel Discussion (Misc queries) | |||
How to apply colouring as in Cells associated with Forumla | Excel Programming |