• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to add the value that multiply by percentage in VBA

Sophanith

New Member
Dear All,

I would like to ask you how to add new value to the old value with percentage in VBA like the code below:

Dim c As Range
For Each c In Selection
If c.Value <> "" Then c.Value = c.Value * 0.3
Next c

The code above just calculate the value so i can't combine the new value with the old value. I would appreciate for those who can help me.

Thanks
 
Dear All,

I would like to ask you how to add new value to the old value with percentage in VBA like the code below:

Dim c As Range
For Each c In Selection
If c.Value <> "" Then c.Value = c.Value * 0.3
Next c

The code above just calculate the value so i can't combine the new value with the old value. I would appreciate for those who can help me.

Thanks
Hi,

Maybe this

Code:
Sub somesub()
Dim c As Range
 For Each c In Selection
 If c.Value <> "" Then c.Value = c.Value + (c.Value * 0.3)
 Next c

End Sub
 
Back
Top