LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Sorting help !!!!!!!!!!!!!!!!!

I keep getting a "Application-defined or object-defined error" with the code
below.

I am tring to sort by columns B, C, D and I. Row(4) has the Header for the
data range. I am using Excel 2007 but people with Excel2003 need to be able
to use it too hence this sorting code.
What am I doing wrong here? Help!!!!!!!!!!

With ActiveWorkbook.Worksheets("Report 1").Range("B4:AX" & BOReport_lastRow)
.Cells.Sort _
key1:=Columns(2), order1:=xlAscending, _
key2:=Columns(3), order2:=xlAscending, _
key3:=Columns(4), order3:=xlAscending, _
key4:=Columns(9), order4:=xlAscending, _
Header:=xlYes
End With
 
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
Sorting Values Without Sorting Formulas SBX Excel Discussion (Misc queries) 2 April 12th 09 11:17 PM
Automatic sorting (giving max and min) based on custom sorting lis Joe Lewis[_2_] Excel Worksheet Functions 4 November 23rd 08 05:12 AM
Sorting VLookup vs Sorting SumProduct Lauren Excel Discussion (Misc queries) 1 August 21st 07 12:19 AM
Sorting: Sorting by the First Character dzuy Excel Discussion (Misc queries) 2 June 22nd 06 08:27 PM
Sorting ListBox results or transposing ListBox values to other cells for sorting Rob[_8_] Excel Programming 1 July 9th 03 04:35 AM


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

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

About Us

"It's about Microsoft Excel"