LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Sort problem in Excel 2007

Hi
I am testing macros that worked in Excel 2003 under Excel 2007.


In the program I use, rows from a list (across several cells) are
sometimes removed and I then use the sort line below to remove the blank
rows left in the list. This then produces the error message below.


'--- Do an alpha sort to remove blanked out lines
Shd.Range("B5:BB40").Sort Key1:=Shd.Range("B5"), Order1:=xlAscending


Error message:
"sort method of the range class failed error 1004"

Is there a simple way around this ?


Interesting:

1. After I 'End' the error message and get back to the page where the
blank rows are I can then sort the rows OK using a slightly different
sort routine (sorted numerically by total instead of alphabetically).


2. When re-running the code back under Excel 2003 I now get the same
error as first appeared in Excel 2007 !!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't sort with Excel 2007 caherpeak Excel Worksheet Functions 0 April 21st 09 10:01 PM
Excel 2007 Query Wizard problem with Access 2007 extensions Showdad Excel Discussion (Misc queries) 0 December 4th 08 05:57 PM
sort function for dates does not sort properly in Office 2007 Exc. Rosalie Excel Worksheet Functions 1 November 22nd 07 10:25 PM
excel 2007 sort problem cindy Excel Worksheet Functions 2 October 3rd 07 01:01 PM
How to fix .sort in Excel 2007 [email protected] Excel Programming 0 April 17th 07 09:13 PM


All times are GMT +1. The time now is 09:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"