Help Please

LUMPKCHA

New member
Joined
Aug 1, 2018
Messages
2
Reaction score
0
Points
0
Excel Version(s)
Excel 2013
I have 2 cells right next to each other. One cell contains 142. The other cell contains 66. When I add 1 unit to 66 I want it to automatically subtract from 142. Is this possible? Please help me. I would greatly appreciate it. Have a good day.
 
.
Paste this macro into a routine module and run it from a command button on the worksheet :

Code:
Option Explicit


Sub AddnSub()
    Range("E3").Value = Range("E3").Value + Range("G3").Value '<-- Change cell reference as needed.
    Range("F3").Value = Range("F3").Value - Range("G3").Value '<-- Change cell reference as needed.
End Sub
 

Attachments

  • Add n Subtract.xlsm
    14.8 KB · Views: 5
Back
Top