Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way is to put a string of zeroes in the blank cell sort they get moved to
the lat rows. Then sort and remove the Z's Sub SortRows() Set SortColumn = Range("V11:V74") For Each cell In SortColumn If cell = "" Then cell = "ZZZZZZZZZZZ" End If Next cell Rows("11:74").Sort _ key1:=SortColumn, _ Order1:=xlAscending, _ header:=xlNo SortColumn.Replace what:="ZZZZZZZZZZZ", replacement:="" End Sub "usmc-r70" wrote: I have a spreadsheet with a data range from A11:AR74, with the sort column being 'V'. I need a macro button to sort rows 11:74 in assending order for those rows with data in column 'V' greater than zero, leaving those rows with zero in column 'V' below the 'populated' rows. Additionally, I need to disable the manual sort and auto filter features, leaving the macro button as the only means to sort on this worksheet. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sort data with blank rows dividing data | Excel Discussion (Misc queries) | |||
Sort with blank rows between data rows | Excel Discussion (Misc queries) | |||
how do i sort data record on two rows? | Excel Worksheet Functions | |||
How to sort data from rows into columns? | Excel Discussion (Misc queries) | |||
How to sort data with rows that have subtotals | Excel Discussion (Misc queries) |