Home |
Search |
Today's Posts |
#14
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On 1/6/2018 at 7:56:51 AM GS wrote:
Oops.., didn't fully cleanup after testing! The working code follows... Sub RoundCurrencyValues() Dim rng As Range, crng On Error Resume Next 'in case no Range("pctChange") Set rng = ActiveSheet.Range("pctChange") If Not rng Is Nothing Then For Each crng In ActiveSheet.UsedRange.Cells If crng.NumberFormat = sCurrencyFormat Then crng.Value = WorksheetFunction.Round(crng * (1 + rng), 2) Next 'crng End If 'Not rng Is Nothing Set rng = Nothing End Sub Your macro worked just fine. Thanks, Garry! You're welcome; -glad to help and I appreciate the feedback! -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
runtime error 13 - type mismatch error in Excel 97 on Citrix | Excel Programming | |||
Error type mismatch in writing macro | Excel Worksheet Functions | |||
Macro error type mismatch | Excel Discussion (Misc queries) | |||
type mismatch error in Benford's law macro | Excel Programming | |||
Visual Basic macro run time error(13) type mismatch | Excel Discussion (Misc queries) |