Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy data from sheet2 to sheet1 when sheet2 has variable # of rows | Excel Discussion (Misc queries) | |||
How to find a data in Sheet1,automatic transfer to Sheet2(Excel) | Excel Discussion (Misc queries) | |||
copying data from sheet1 to sheet2 | Excel Worksheet Functions | |||
How To Retrieve Data from Sheet2 into Sheet1 | Excel Worksheet Functions | |||
creat and transfer data sheet1 to sheet2 | Excel Programming |