merlynsdad
Programmer
At the end of a program to determine most correct monitorings in a call site, I am left with a worksheet that has had all rows, except for those of the winner, deleted. The pertinent code is as follows:
intHigh = Application.WorksheetFunction.Max(Range("u6:u1500"))
intNextHigh = Application.WorksheetFunction.Max(Range "u6:u1500")) - 1
Range("u6").Select
Do Until ActiveCell = ""
If ActiveCell < intNextHigh Then
Rows(ActiveCell.Row).Select
Selection.Delete shift:=xlUp
ActiveCell.Offset(0, 20).Select
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
I also need to find the 2nd highest number of calls, which at present will only be 1 off the winning total. So I'm using intNextHigh for that. In the future, though, this may not be off by just one. How can I find the "next max" number, since I can't resort the original column because I've deleted the rest of the rows?
If the square peg won't fit in the round hole, sand off the corners.
intHigh = Application.WorksheetFunction.Max(Range("u6:u1500"))
intNextHigh = Application.WorksheetFunction.Max(Range "u6:u1500")) - 1
Range("u6").Select
Do Until ActiveCell = ""
If ActiveCell < intNextHigh Then
Rows(ActiveCell.Row).Select
Selection.Delete shift:=xlUp
ActiveCell.Offset(0, 20).Select
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
I also need to find the 2nd highest number of calls, which at present will only be 1 off the winning total. So I'm using intNextHigh for that. In the future, though, this may not be off by just one. How can I find the "next max" number, since I can't resort the original column because I've deleted the rest of the rows?
If the square peg won't fit in the round hole, sand off the corners.