Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro or script
Could i find out how to write a macro or script. I want to click on
one or more cells in a range containing text and have that text copied to the bottom of a second range.and be able to repeat that procedure. thank you jim 80215 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro or script
Seems like you posted this in Worksheet.functions yesterday.
Assume two named ranges, List1 and List2. List2 is on Sheet2 In the sheet with List1 Right click on the sheet tab and select view code Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) End Sub put in code like Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Dim rng As Range, rng1 As Range If Target.Count 1 Then Exit Sub If Not Intersect(Target, Range("List1")) Is Nothing Then Set rng = Worksheets("Sheet2").Range("List2") Set rng1 = rng(1).End(xlDown)(2) rng1.Value = Target.Value rng.Resize(rng.Rows.Count + 1).Name = "List2" End If End Sub -- Regards, Tom Ogilvy JIM80215 wrote in message m... Could i find out how to write a macro or script. I want to click on one or more cells in a range containing text and have that text copied to the bottom of a second range.and be able to repeat that procedure. thank you jim 80215 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Script help | Excel Worksheet Functions | |||
Macro Script | Excel Discussion (Misc queries) | |||
VB script/macro help - please !! | Excel Discussion (Misc queries) | |||
Macro or Script??? | Excel Programming |