Hi guys, I have a serious problem here.
I have a large set of data and need to be able to resort it on the fly. I wrote simple code
That has seemingly been doing the job for a couple weeks now.
I presented it to my boss this morning only to find that the data is not sorting properly! It puts numbers way out of order all over the place! I tried using sort option from the data menu (as opposed to a macro) and it does the same thing!
This is a crucial function of the program, and I need either a solution or a work around of some kind.
Right now I'm working with around 10,000 lines, but I'll ultimately need to have this work for all 40,000 lines Excel will give and then some. My key range is copying from another worksheet in the same book (ie. the key range formula is "=Calculations!xx") and all the values are stored as numbers. I am using Excel 2003.
Thank you all for your help in the past. I'm sorry if I seem harried, it's just really alarming to find that a crucial thing isn't working under deadline. I'm sure you guys know the feeling.
I have a large set of data and need to be able to resort it on the fly. I wrote simple code
Code:
Private Sub resortriskplan()
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Range("A8:J10007").Sort Key1:=Range("B8"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Call dblcheckplanning
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
That has seemingly been doing the job for a couple weeks now.
I presented it to my boss this morning only to find that the data is not sorting properly! It puts numbers way out of order all over the place! I tried using sort option from the data menu (as opposed to a macro) and it does the same thing!
This is a crucial function of the program, and I need either a solution or a work around of some kind.
Right now I'm working with around 10,000 lines, but I'll ultimately need to have this work for all 40,000 lines Excel will give and then some. My key range is copying from another worksheet in the same book (ie. the key range formula is "=Calculations!xx") and all the values are stored as numbers. I am using Excel 2003.
Thank you all for your help in the past. I'm sorry if I seem harried, it's just really alarming to find that a crucial thing isn't working under deadline. I'm sure you guys know the feeling.
Last edited: