Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Transfer data from sheet1 to sheet2

On sheet1 I have a list of names from a to z in column a, in col b is a
score, I want to transfer that information to sheet2 with the lowest score
listed first. I need to transfer the name also with the score.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Transfer data from sheet1 to sheet2

Sub AA()
With Worksheets("Sheet1")
.Range("A1").CurrentRegion.Resize(, 2).Copy _
Destination:=Worksheets("Sheet2").Range("A1")
End With
Worksheets("Sheet2").Range("A1") _
.CurrentRegion.Sort Key1:= _
Worksheets("Sheet2").Range("B1"), _
Order1:=xlAscending
End Sub

--
Regards,
Tom Ogilvy





"Tommy" wrote in message
...
On sheet1 I have a list of names from a to z in column a, in col b is a
score, I want to transfer that information to sheet2 with the lowest score
listed first. I need to transfer the name also with the score.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Transfer data from sheet1 to sheet2

Tom

Thank you for the reply, but I am new at this, I do not understand. Could
you explain a little more please.

"Tom Ogilvy" wrote:

Sub AA()
With Worksheets("Sheet1")
.Range("A1").CurrentRegion.Resize(, 2).Copy _
Destination:=Worksheets("Sheet2").Range("A1")
End With
Worksheets("Sheet2").Range("A1") _
.CurrentRegion.Sort Key1:= _
Worksheets("Sheet2").Range("B1"), _
Order1:=xlAscending
End Sub

--
Regards,
Tom Ogilvy





"Tommy" wrote in message
...
On sheet1 I have a list of names from a to z in column a, in col b is a
score, I want to transfer that information to sheet2 with the lowest score
listed first. I need to transfer the name also with the score.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Transfer data from sheet1 to sheet2

hope this helps I need to transfer this information to sheet2 with the lowest
score first and I need the names to transfer also.
a d c
NAME GROSS
1 Alcorn, Jack 86
2 Alter, Dave
3 Ammons, Boats
4 Ash, Bob 104
5 Bee, Frank 93
6 Boles, Charlie 96
7 Bonjour, Roger
8 Branham, Howard
9 Brescia, Tony
10 Brevelle, Ted
11 Brown, John
12 Brown, Randy
13 Browne, David 84
14 Carlson, Steve
15 Carpenter, Paul
16 Chappell, Jim 90
17 Choi, Jong
18 Conway, Joel
19 Corley, Richard
20 Dee, Marty 87
21 Doughty, Jerry
22 Dukes, Charles
23 Furche, Ed
24 Gardner, Don
25 Gardner, Wes
26 Garnett, Delton
27 Geddes, Earl
28 Gibson, Jack
29 Gilliam, Kraig
30 Gorg, Ron 75
31 Hamm, Bob 93
32 Haney, Wayne 81
33 Holbert, Larry
34 Jackson, Joe
35 Jenkins, Jim 89
36 Kelsoe, James 111
37 Klinger, Irv
38 Kucharski, Vic 86
39 Mapes, Bob
40 McDonald, Jay 109
41 McKracken, Phil
42 Mercier, Rene
43 Merrick, Frank
44 Morton, Jim
45 Norman, Yancy
46 Oellermann, Bill
47 O'neal, Hank 92
48 Plunkett, Larry 93
49 Shantz, Randy
50 Slough, Fred
51 Vasquez, Mike 102
52 Wasik, Bob
53 Watson, Dennis
54 Wilkshire, Bill 82
55 Wilkshire, Bob 86
56 Young, Benny

"Tom Ogilvy" wrote:

Sub AA()
With Worksheets("Sheet1")
.Range("A1").CurrentRegion.Resize(, 2).Copy _
Destination:=Worksheets("Sheet2").Range("A1")
End With
Worksheets("Sheet2").Range("A1") _
.CurrentRegion.Sort Key1:= _
Worksheets("Sheet2").Range("B1"), _
Order1:=xlAscending
End Sub

--
Regards,
Tom Ogilvy





"Tommy" wrote in message
...
On sheet1 I have a list of names from a to z in column a, in col b is a
score, I want to transfer that information to sheet2 with the lowest score
listed first. I need to transfer the name also with the score.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Transfer data from sheet1 to sheet2

all Tom did was simply copy the table to a new sheet and then sorted it.
yuo can try this yourself by switch on the mavro recorder, copyiny the table
to another sheet and then sort it. switch off the macro recorder and examine
the code generated. It won't look exactly like Tom's as it will be more
specific, but it's a good way to learn.


"Tommy" wrote:

Tom

Thank you for the reply, but I am new at this, I do not understand. Could
you explain a little more please.

"Tom Ogilvy" wrote:

Sub AA()
With Worksheets("Sheet1")
.Range("A1").CurrentRegion.Resize(, 2).Copy _
Destination:=Worksheets("Sheet2").Range("A1")
End With
Worksheets("Sheet2").Range("A1") _
.CurrentRegion.Sort Key1:= _
Worksheets("Sheet2").Range("B1"), _
Order1:=xlAscending
End Sub

--
Regards,
Tom Ogilvy





"Tommy" wrote in message
...
On sheet1 I have a list of names from a to z in column a, in col b is a
score, I want to transfer that information to sheet2 with the lowest score
listed first. I need to transfer the name also with the score.






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Transfer data from sheet1 to sheet2

Patrick and Tom

I got everything to work, but how do I get it to auto update sheet2 when I
make a change on sheet1.

"Patrick Molloy" wrote:

all Tom did was simply copy the table to a new sheet and then sorted it.
yuo can try this yourself by switch on the mavro recorder, copyiny the table
to another sheet and then sort it. switch off the macro recorder and examine
the code generated. It won't look exactly like Tom's as it will be more
specific, but it's a good way to learn.


"Tommy" wrote:

Tom

Thank you for the reply, but I am new at this, I do not understand. Could
you explain a little more please.

"Tom Ogilvy" wrote:

Sub AA()
With Worksheets("Sheet1")
.Range("A1").CurrentRegion.Resize(, 2).Copy _
Destination:=Worksheets("Sheet2").Range("A1")
End With
Worksheets("Sheet2").Range("A1") _
.CurrentRegion.Sort Key1:= _
Worksheets("Sheet2").Range("B1"), _
Order1:=xlAscending
End Sub

--
Regards,
Tom Ogilvy





"Tommy" wrote in message
...
On sheet1 I have a list of names from a to z in column a, in col b is a
score, I want to transfer that information to sheet2 with the lowest score
listed first. I need to transfer the name also with the score.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Transfer data from sheet1 to sheet2

http://www.cpearson.com/excel/events.htm

has information on events. I suspect you would want to use the change event
to execute the code.

--
Regards,
Tom Ogilvy

"Tommy" wrote in message
...
Patrick and Tom

I got everything to work, but how do I get it to auto update sheet2 when I
make a change on sheet1.

"Patrick Molloy" wrote:

all Tom did was simply copy the table to a new sheet and then sorted it.
yuo can try this yourself by switch on the mavro recorder, copyiny the

table
to another sheet and then sort it. switch off the macro recorder and

examine
the code generated. It won't look exactly like Tom's as it will be more
specific, but it's a good way to learn.


"Tommy" wrote:

Tom

Thank you for the reply, but I am new at this, I do not understand.

Could
you explain a little more please.

"Tom Ogilvy" wrote:

Sub AA()
With Worksheets("Sheet1")
.Range("A1").CurrentRegion.Resize(, 2).Copy _
Destination:=Worksheets("Sheet2").Range("A1")
End With
Worksheets("Sheet2").Range("A1") _
.CurrentRegion.Sort Key1:= _
Worksheets("Sheet2").Range("B1"), _
Order1:=xlAscending
End Sub

--
Regards,
Tom Ogilvy





"Tommy" wrote in message
...
On sheet1 I have a list of names from a to z in column a, in col b

is a
score, I want to transfer that information to sheet2 with the

lowest score
listed first. I need to transfer the name also with the score.





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
copy data from sheet2 to sheet1 when sheet2 has variable # of rows Anne Excel Discussion (Misc queries) 6 February 27th 09 09:48 PM
How to find a data in Sheet1,automatic transfer to Sheet2(Excel) Edmond Excel Discussion (Misc queries) 1 March 6th 07 04:38 AM
copying data from sheet1 to sheet2 Rookie Excel Worksheet Functions 3 September 7th 06 12:09 PM
How To Retrieve Data from Sheet2 into Sheet1 compconnj Excel Worksheet Functions 3 March 21st 06 07:56 PM
creat and transfer data sheet1 to sheet2 John12 Excel Programming 2 July 14th 04 04:14 PM


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

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"