Thread: Need Macro...
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Need Macro...

Hi,

Am Mon, 8 Dec 2014 23:43:15 +0000 (UTC) schrieb tb:

What I would like to do is enter the % increase into a cell of the
first worksheet (say cell A1 of Sheet1) and then launch a macro that
will find all the cells that are formatted as currency (in each
worksheet) and apply the % increase.


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.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional