Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy workbook, don't copy macro | Excel Discussion (Misc queries) | |||
Macro to Copy data from a list in sheet1 and paste into sheet2 | Excel Discussion (Misc queries) | |||
Copy # fm one list to matching id in list 2? | Excel Worksheet Functions | |||
Need macro to copy a list of named cells between worksheets | Excel Worksheet Functions | |||
How to remove duplicates from a list and copy new list to new colu | Excel Worksheet Functions |