Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How select active rows from A to D columns?
I have a spread sheet like this, I want to make a macro to sort by Column A,
the problem is that the macro is written with an specific row: Range("A1:D8").Select How can I change the code to select active rows from column A to D? and then apply the sort by column A, remember that rows may change from 8 to 20 or 1000. A B C D 1 Part Desc Qty LOC 2 A15245 Etc 15 502A 3 B15245 Etc 15 503A 4 A15245 Etc 15 502A 5 C15245 Etc 15 501A 6 D15245 Etc 15 502B 7 A15245 Etc 15 502B 8 515245 Etc 15 502A Thanks in advanced. -- Lorenzo DÃ*az Cad Technician |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How select active rows from A to D columns?
Have you tried something like
Range("A1").CurrentRegion.Select -- HTH, Barb Reinhardt If this post was helpful to you, please click YES below. "ldiaz" wrote: I have a spread sheet like this, I want to make a macro to sort by Column A, the problem is that the macro is written with an specific row: Range("A1:D8").Select How can I change the code to select active rows from column A to D? and then apply the sort by column A, remember that rows may change from 8 to 20 or 1000. A B C D 1 Part Desc Qty LOC 2 A15245 Etc 15 502A 3 B15245 Etc 15 503A 4 A15245 Etc 15 502A 5 C15245 Etc 15 501A 6 D15245 Etc 15 502B 7 A15245 Etc 15 502B 8 515245 Etc 15 502A Thanks in advanced. -- Lorenzo DÃ*az Cad Technician |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
How select active rows from A to D columns?
This works great.
Thanks LD -- Lorenzo DÃ*az Cad Technician "Barb Reinhardt" wrote: Have you tried something like Range("A1").CurrentRegion.Select -- HTH, Barb Reinhardt If this post was helpful to you, please click YES below. "ldiaz" wrote: I have a spread sheet like this, I want to make a macro to sort by Column A, the problem is that the macro is written with an specific row: Range("A1:D8").Select How can I change the code to select active rows from column A to D? and then apply the sort by column A, remember that rows may change from 8 to 20 or 1000. A B C D 1 Part Desc Qty LOC 2 A15245 Etc 15 502A 3 B15245 Etc 15 503A 4 A15245 Etc 15 502A 5 C15245 Etc 15 501A 6 D15245 Etc 15 502B 7 A15245 Etc 15 502B 8 515245 Etc 15 502A Thanks in advanced. -- Lorenzo DÃ*az Cad Technician |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can change range to select active rows instead of :=Range("S10 | Excel Discussion (Misc queries) | |||
Select Active Cells | Excel Worksheet Functions | |||
How to set printer default to select active sheet not whole book | Excel Discussion (Misc queries) | |||
How to select the active sheet? | Excel Worksheet Functions | |||
How do you select two cells in different rows and columns with ou. | Excel Discussion (Misc queries) |