Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change event copy & paste
Hello,
I have a financial worksheet where column E lists "credits" and column F lists "debits" and column G lists the credits minus the debits and then adds this result to the running balance. I wanted to add a change event so that whenever a value is typed into columns E or F, the value in column G would automatically copy down from the cell directly above it. I've tried something similar to the following code, but I know I'm way off. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "E:E" Then If Target.Address "0" Then Range(Target).Offset(-1, 2).Copy Range(Target).Offset(0, 2) End If End If If Target.Address = "F:F" Then If Target.Address "0" Then Range(Target.Address).Offset(-1, 1).Copy Range(Target.Address).Offset(0, 1) End If End If End Sub Any help would be great! Thank you!!! Dan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Worksheet Change Event - copy cell to another sheet | Excel Discussion (Misc queries) | |||
Data Change after Copy/Paste | Excel Discussion (Misc queries) | |||
event macros vs copy/paste | Excel Worksheet Functions | |||
Copy Sheets minus Worksheet Change Event code & Macro Buttons | Excel Programming | |||
Worksheet_Change Event - Macro kills copy and paste | Excel Programming |