Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
Macro Script help Joe Clueless Excel Worksheet Functions 4 January 24th 10 05:32 PM
Macro Script mldancing Excel Discussion (Misc queries) 2 March 15th 07 08:35 PM
VB script/macro help - please !! Anthony Excel Discussion (Misc queries) 2 July 10th 05 07:58 PM
Macro or Script??? milton Excel Programming 2 October 22nd 03 09:46 PM


All times are GMT +1. The time now is 04:24 AM.

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"