I have the following macro, that I need to add a certain value "R9" to a list of cells "D14:D21"
The problem is the cell "R9" is a variable and decreases after every occurrence, because increasing the value of "D14", decreases "R9".
How do I get excel to add the value of "R9" to all the cells before "R9" decreases?
I have also attached the excel sheet with the cells and macro.
Sub BonusLap()
'
' BonusLap Macro
'
' Keyboard Shortcut: Ctrl+Shift+L
Range("D14").Value = Range("D14").Value + Range("R9").Value
Range("D15").Value = Range("D15").Value + Range("R9").Value
Range("D16").Value = Range("D16").Value + Range("R9").Value
Range("D17").Value = Range("D17").Value + Range("R9").Value
Range("D18").Value = Range("D18").Value + Range("R9").Value
Range("D19").Value = Range("D19").Value + Range("R9").Value
Range("D20").Value = Range("D20").Value + Range("R9").Value
Range("D21").Value = Range("D21").Value + Range("R9").Value
'
End Sub
Thanks,
Jason
Bookmarks