Hi all.
I wrote a udf to rank based on filtering... if visible, I consider it, if hidden, I note it. I bubble sort high to low, fill an array with rank 1 to count .... then I re-sort rank array based on original order. All done with arrays. I need to paste the rank back to the sheet - remember the sheet is filtered.
I initiate the rank sub based on a value on the sheet changes - on calculate... and I also initiate the rank sub based on a subtotal calculate event on the sheet to capture when the filter is changed. All works well.. BUT!
It seems that when I paste the rank back to the filtered sheet, it does not paste.. something to do with the filtering. If I loop thru the array, it works, but slowly..
Does not work properly... well, works if the filter is set to show the 1st row in the range
Range("DFMEA_RANK_RANGE") = WorksheetFunction.Transpose(take_top_ten_array)
This works, but way to slowly...
Application.EnableEvents = False
For i = 1 To rpn_range.Count
Range("DFMEA_RANK_RANGE").Cells(i, 1) = take_top_ten_array(i)
Next i
Application.EnableEvents = True
Thanks for the help....
Steve
Harrisburg, PA
Bookmarks