ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA sort (https://www.excelbanter.com/excel-programming/433067-vba-sort.html)

Mark_F via OfficeKB.com

VBA sort
 
Greetings, all.

As you can see by the VBA below, I'm deleting empty cells out of named ranges.
After the VBA for "SortedEE" executes, the cells in "SortedEQ" get moved up
into the range for "SortedEE" and some of my data gets deleted. I thought
because I was using a reference to a name that I could have both name ranges
be sorted and have the empty cells deleted. Is my sorting the problem? I
figured the source of my problem might be VBA below.

VBA Example: Range("SortedEE").SpecialCells(xlCellTypeBlanks).E ntireRow.
Delete
Range("SortedEQ").SpecialCells(xlCellTypeBlanks).
EntireRow.Delete

Any help would be greatly appreciated.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200908/1


Mark_F via OfficeKB.com

VBA sort
 
Mark_F wrote:
Greetings, all.

As you can see by the VBA below, I'm deleting empty cells out of named ranges.
After the VBA for "SortedEE" executes, the cells in "SortedEQ" get moved up
into the range for "SortedEE" and some of my data gets deleted. I thought
because I was using a reference to a name that I could have both name ranges
be sorted and have the empty cells deleted. Is my sorting the problem? I
figured the source of my problem might be VBA below.

VBA Example: Range("SortedEE").SpecialCells(xlCellTypeBlanks).E ntireRow.
Delete
Range("SortedEQ").SpecialCells(xlCellTypeBlanks).
EntireRow.Delete

Any help would be greatly appreciated.


PLEASE DISREGARD POST. PROBLEM HAS BEEN FIGURED OUT.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200908/1



All times are GMT +1. The time now is 01:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com