Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying to another worksheet
How can I copy columns from one worksheet to another in VBA? Also is there a
way to clear the whole sheet when I'm finished? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying to another worksheet
I'm using the below to sort my worksheet but can only sort by three columns,
does anyone know if it's possible to sort more then three columns? I haven't been able to figure it out yet. Range("A" & Last_Header_Row & ":AA55550").Sort Key1:=Range(First_Column & Last_Header_Row), _ Order1:=xlAscending, Key2:=Range(Second_Column & Last_Header_Row), _ Order2:=xlAscending, Key3:=Range(Third_Column & Last_Header_Row), _ Order3:=xlAscending, Header:=xlNo, _ OrderCustom:=1, MatchCase:=False, _ Orientation:=xlTopToBottom |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying to another worksheet
worksheets(1).Columns(3).copy Destination:=Worksheets("Data").Range("F1")
Worksheets("Data").Cells.ClearContents or Worksheets("Data").Rows.Delete -- Regards, Tom Ogilvy "HotRod" wrote in message ... How can I copy columns from one worksheet to another in VBA? Also is there a way to clear the whole sheet when I'm finished? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying to another worksheet
Excel only allows you to sort on three columns at a time. However, it uses
a persistent sort, so you can sort repeatedly from your least significant columns to the most significant columns (3 or less at a time) and the results will be the same as if you sorted on all those columns at once. -- Regards, Tom Ogilvy "HotRod" wrote in message ... I'm using the below to sort my worksheet but can only sort by three columns, does anyone know if it's possible to sort more then three columns? I haven't been able to figure it out yet. Range("A" & Last_Header_Row & ":AA55550").Sort Key1:=Range(First_Column & Last_Header_Row), _ Order1:=xlAscending, Key2:=Range(Second_Column & Last_Header_Row), _ Order2:=xlAscending, Key3:=Range(Third_Column & Last_Header_Row), _ Order3:=xlAscending, Header:=xlNo, _ OrderCustom:=1, MatchCase:=False, _ Orientation:=xlTopToBottom |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying to another worksheet
THANKS
"Tom Ogilvy" wrote in message ... worksheets(1).Columns(3).copy Destination:=Worksheets("Data").Range("F1") Worksheets("Data").Cells.ClearContents or Worksheets("Data").Rows.Delete -- Regards, Tom Ogilvy "HotRod" wrote in message ... How can I copy columns from one worksheet to another in VBA? Also is there a way to clear the whole sheet when I'm finished? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Worksheet formula incorrect after copying to another worksheet | Excel Worksheet Functions | |||
Copying the active worksheet to another worksheet in the same work | Excel Worksheet Functions | |||
Looking up a variable in one worksheet and copying information from another column to another worksheet?? | Excel Discussion (Misc queries) | |||
Copying a worksheet witrh protected cells to a new worksheet | Excel Worksheet Functions | |||
Copying Worksheet triggers Click event of combobox on another worksheet | Excel Programming |