Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Auto copy and pasting

Need help. I need a macro or program that can sort and copy the
information I enter in one sheet over to another sheet. The information
needs to be sorted by name and filed on the distention sheet in that
order. As I enter the information or by a command.
Example:
Sheet 1: John
Tom
Jim
Bob
Tom
Bob

Sheet 2 The information would look like this

John
Tom
Tom
Bob
Bob

Any Idea or am I in to deep?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Auto copy and pasting

Private Sub CommandButton1_Click()
Dim rng as Range
Worksheets("Sheet2").Cells.ClearContents
set rng = Worksheets("Sheet1").Range("A1").CurrentRegion
rng.copy Destination:=Worksheets("Sheet2").Range("A1")
set rng = Worksheets("Sheet2").Range("A1").CurrentRegion
rng.sort Key:=rng.Parent.Range("A1")
End Sub

--
Regards,
Tom Ogilvy


"cdixon" wrote in message
oups.com...
Need help. I need a macro or program that can sort and copy the
information I enter in one sheet over to another sheet. The information
needs to be sorted by name and filed on the distention sheet in that
order. As I enter the information or by a command.
Example:
Sheet 1: John
Tom
Jim
Bob
Tom
Bob

Sheet 2 The information would look like this

John
Tom
Tom
Bob
Bob

Any Idea or am I in to deep?



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
how do i auto update cell values after pasting linked references kev Excel Worksheet Functions 0 December 6th 07 05:09 PM
Auto-populate, Auto-copy or Auto-fill? Jay S. Excel Worksheet Functions 4 August 10th 07 09:04 PM
Auto Fill with pasting values Luci Excel Discussion (Misc queries) 2 May 24th 07 04:31 AM
can excel auto correct when cutting and pasting bsmile29 Excel Discussion (Misc queries) 5 June 21st 06 09:06 PM
pasting a hi-lighted auto sum MarkT Excel Discussion (Misc queries) 6 February 10th 05 01:54 AM


All times are GMT +1. The time now is 05:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"