Range multiplication

0 Agios

Well-known Member
Joined
Feb 22, 2004
Messages
570
Office Version
  1. 365
In a range ("A1:A30") are values, What I need to do is have those values multipled by 1.07 and the new value incerter in the cell using VBA, I dont wantto use a formula.
Thanks.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
put 1.07 in a spare cell.
Copy that cell.
Select A1:A30
Paste Special with Multiply checked.
Delete the spare cell

If you need this to be a macro, you can record it.
 
Upvote 0
Untested but should do the trick:

Code:
Sub RangeMultiply()
For Each c in Range("A1:A30")
     c.Value = c.Value * 1.07
Next c
End Sub
 
Upvote 0
Try

Code:
Sub ctest()
Dim c As Range
For Each c In Range("A1:A30")
    c.Value = 1.07 * c.Value
Next c
End Sub
 
Upvote 0
Try:-
Code:
Private Sub CommandButton2_Click()
With Range("A1:A30")
    .Value = Evaluate("if(row(), ""=1.07*"" & " & .Address & ")")
    .Value = .Value
End With
 
Upvote 0
Thanks MickG', VoG,CWatts, mikerickson


I tried this and worket gret


Private Sub Label136_Click()

Dim c As Range
For Each c In Range("F10:F43")
c.Value = 1.07 * c.Value
Next c
Unload Me

End Sub
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top