VBA Code to Multiple Specific Cells by Cell Value

rbellavance22

New Member
Joined
Aug 8, 2019
Messages
14
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
 

Some videos you may like

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,669
Office Version
365
Platform
Windows
Why have you just duplicated post#9? Please do not duplicate your posts in future.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,669
Office Version
365
Platform
Windows
Thanks, did you see post#10?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,669
Office Version
365
Platform
Windows

rbellavance22

New Member
Joined
Aug 8, 2019
Messages
14
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?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,669
Office Version
365
Platform
Windows
Change Ceiling to Floor
 

Watch MrExcel Video

Forum statistics

Threads
1,102,363
Messages
5,486,406
Members
407,547
Latest member
Sankarasrinivas

This Week's Hot Topics

Top