Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 54
Default Sorting Madness

I'm using Excel 2003 and sorting rows by one of eight different column
headings. I've placed a transparent shape over each heading and assigned one
of the eight different sort macros to each corresponding column. Columns B,
C, D, H, I, and J work just fine. Columns K and L are giving me strange
output. Here's the macro for column K "FIN IMPACT":

Sub sortImpact()
ActiveSheet.Unprotect
Dim strSrt As Long
strSrt = MsgBox("Do you want to sort your policies by FINANCIAL
IMPACT?", 4 + 32, "Sort Table")
If strSrt = vbYes Then
Range("B2:L101").Sort Key1:=Range("K2"), Order1:=xlDescending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End If
ActiveSheet.Protect
End Sub

Instead of listing the data from most expensive to least expensive starting
w/ row 2, the data sorts in the correct order but lists ending on row 101.
For example: if I have two rows, I expect the data to sort on rows 2 & 3.
Instead it sorts on rows 100 & 101 (the last two rows). The only columns
that sort like this are K & L. The only difference between these macros and
others, which work normally, is the sort key range.
 
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
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
March Madness and Conditional Formatting (Excel2007) Denniso6 Excel Discussion (Misc queries) 0 March 12th 07 03:50 PM
Formula Madness IoHeFy Excel Discussion (Misc queries) 2 January 4th 07 01:16 PM
Multimodal Madness Rothman Excel Worksheet Functions 0 March 16th 06 12:56 AM


All times are GMT +1. The time now is 02:17 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"