Multiply a Range by a Constant

G

Guest

I would like to multiply a range by a constant. My range is Target

Target.value = [Target.value] * sngPercent

is what I have but it doesn't work. Any suggestions besides traversing the
range one element at a time?

Thanks In Advance...
 
F

FuzzyDove

I'm not a real "coder" but the following crude code will probably d
what you want. In this case, the range is cells a1:a5 and I'v
multiplied it by 100 and put the results in range c1:c5. Hope thi
helps... FuzzyDove

Sub aaa()
Dim XYZ As Range
For Each XYZ In Range("a1:a5")
XYZ.Offset(0, 2).Value = XYZ.Value * 100
Next
End Su
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top