Thread: Need Macro...
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
tb tb is offline
external usenet poster
 
Posts: 84
Default Need Macro...

On 12/9/2014 at 6:34:56 AM Claus Busch wrote:


try:

Sub Test()
Dim i As Long
Dim rngC As Range

For i = 1 To Sheets.Count
For Each rngC In Sheets(i).UsedRange
If Len(rngC) 0 And rngC.Style = "Currency" Then
'rngc will increased by 5%
rngC = rngC * 1.05
End If
Next
Next
End Sub


Regards
Claus B.


I am getting "Run-time error 13" and "Type mismatch" errors. I'm not
a macro expert so I don't know how to debug this.

Also, where in your macro does the user enter the desired % increase
and where does it round to two decimals?

--
tb