VBA Code to Multiple Specific Cells by Cell Value

rbellavance22

New Member
Joined
Aug 8, 2019
Messages
14
Hello,

I have a worksheet with various dollar amounts in multiple cells.

I would like to come up with a VBA Code to increase specific cells (B14, C14, D14, B15, C15, D15) by a percentage that is set by a cell value (cell A1).

Any help would be greatly appreciated!
 
Great, thank you for your help.

One last thing: if I wanted to add two additional cells, C45 and D81, how would I do that?

How about
Code:
Sub IncreaseByPercentage()
  With Range("B14:D15")
    .Value = Evaluate("if({1},ceiling(A1*" & .Address & ",0.05))")
  End With
End Sub
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Why have you just duplicated post#9? Please do not duplicate your posts in future.
 
Upvote 0
I ran into a situation where I need to decrease the cell values based on the value of A1. Is there a simple solution for that?
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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