Macro for copy to list
Hi everyone
I want to copy a new entry (Name of candidate) in a list to the same location (e.g. a1,a2... in Sheet1) in another sheet and another list (e.g. a1,a2... in Sheet2. However I need this to be automated (I assume a macro is needed). only the information in column A should be copied as the other entries in the list are different. I have used a list so that data can be filtered and totaled on the filtered amounts etc. Have any of you got any ideas? Thank you Garry |
Macro for copy to list
The code below should do the trick for you. It is worksheet event code, so
to get it into the proper place, choose the sheet (Sheet1) where you will be entering the new names and right-click on the name tab and choose [View Code] from the option list that appears. Copy the code below and paste it into the module presented to you and then you can close the VB Editor. After that, anything you type into a cell in column A of Sheet1 will be copied over into the same cell in Sheet2. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 1 Then 'change took place in column A Worksheets("Sheet2").Range(Target.Address) = Target End If End Sub "Garrystone" wrote: Hi everyone I want to copy a new entry (Name of candidate) in a list to the same location (e.g. a1,a2... in Sheet1) in another sheet and another list (e.g. a1,a2... in Sheet2. However I need this to be automated (I assume a macro is needed). only the information in column A should be copied as the other entries in the list are different. I have used a list so that data can be filtered and totaled on the filtered amounts etc. Have any of you got any ideas? Thank you Garry -- Garrystone |
All times are GMT +1. The time now is 02:49 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com