![]() |
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 |
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 |
All times are GMT +1. The time now is 07:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com