LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Worksheet Change Event - copy cell to another sheet dhstein Excel Discussion (Misc queries) 2 October 12th 09 06:35 PM
Data Change after Copy/Paste Neon520 Excel Discussion (Misc queries) 4 March 28th 09 02:12 PM
event macros vs copy/paste Dave Excel Worksheet Functions 2 November 17th 08 02:36 AM
Copy Sheets minus Worksheet Change Event code & Macro Buttons Bob[_36_] Excel Programming 0 October 8th 03 01:17 AM
Worksheet_Change Event - Macro kills copy and paste Alan Excel Programming 5 September 23rd 03 02:58 AM


All times are GMT +1. The time now is 12:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"