Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for sorting a worksheet
I've looked everywhere. Is there a macro that someone has that can sort a
work sheet by one colum "P" where if it is blank all the blanks are at the bottom and the filled in cells are at the top. Thanks Ralph -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200702/1 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for sorting a worksheet
Sub Macro1()
Range("P1:R10").Sort Key1:=Range("P1"), Order1:=xlAscending, _ Header:=xlGuess, OrderCustom:=1, MatchCase:=False, _ Orientation:=xlTopToBottom, DataOption1:=xlSortNormal End Sub Change range to suit. It put the blanks at the bottom for me. Hth, Merjet |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for sorting a worksheet
That Excel sorts in this order:
numbers text blanks (sort to the bottom) -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "ralphdevlin via OfficeKB.com" <u11047@uwe wrote in message I've looked everywhere. Is there a macro that someone has that can sort a work sheet by one colum "P" where if it is blank all the blanks are at the bottom and the filled in cells are at the top. Thanks Ralph |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for sorting a worksheet
Thanks that worked, what I would like to do is adda Worksheet change even to
run the macro when the worksheet is saved so I don't have to run it automatically. Thanks Ralph merjet wrote: Sub Macro1() Range("P1:R10").Sort Key1:=Range("P1"), Order1:=xlAscending, _ Header:=xlGuess, OrderCustom:=1, MatchCase:=False, _ Orientation:=xlTopToBottom, DataOption1:=xlSortNormal End Sub Change range to suit. It put the blanks at the bottom for me. Hth, Merjet -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200702/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sorting a Worksheet | Excel Worksheet Functions | |||
Sorting Master Worksheet to Regional Worksheet | Excel Worksheet Functions | |||
Sorting a range on another worksheet without selecting the worksheet | Excel Programming | |||
Sorting - Macro or worksheet function | Excel Worksheet Functions | |||
worksheet sorting | Excel Worksheet Functions |