Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
In an earlier post John provided me with a macro to round the values in a selected cell range. The code was: Sub Add_Rounding() Dim cellRange As Range Dim Rng As Range Dim cellFormula As String On Error Resume Next Set cellRange = Range("A1:C10").SpecialCells(xlCellTypeFormulas) For Each Rng In cellRange cellFormula = Mid(Rng.Formula, 2, 1024) If InStr(UCase(cellFormula), UCase("Round")) = 0 Then Rng.Formula = "=round(" & cellFormula & ",0)" End If Next Rng End Sub Unfortunately, some of my worksheets have fixed values not calculated values in the fields, and the macro doesn't amend any cell that doesn't begin with an = sign. Can anyone tell me how to make it work for fixed values. Thanks Jon |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing text case in entire database column from JOHN to John | Excel Discussion (Misc queries) | |||
Change Smith, John to John Smith | Excel Discussion (Misc queries) | |||
I am trying to change Smith, John to John Smith | Excel Discussion (Misc queries) | |||
How do I change "Doe, John" to "John Doe" in Excel? | Excel Discussion (Misc queries) | |||
how to format Doe,John to Doe, John (space after a comma) | Excel Worksheet Functions |