How to make Macro Repeat

Closed
Fred - Apr 8, 2016 at 08:22 AM
 Blocked Profile - Apr 8, 2016 at 04:41 PM
Hello,

I am trying to run a macro where I multiply a range (B3: B615) by a number (B2). The problem is I want to do this for every column in my worksheet. Thus I want (C3: C615) multiplied by C2, and (D3: D615) multiplied by D2, etc.

I was able to make a macro to complete this task for only one column, but does anyone know how to make it repeat for each column? Thank you!

Sub Macro1()
'
' Macro1 Macro
'

'
Range("B2").Select
Selection.Copy
Range("B3:B615").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
End Sub

1 response

Blocked Profile
Apr 8, 2016 at 04:41 PM
Well, build a range, and count the column in the range. Then a For loop for each column in range!
0