Hello All, First of all I would like to clarify that I know I should really use base to do what I want to do, but I am also too lazy to learn so I would like to keep using calc... sorry!
Ok, here we go with my problem. I have a table with some hundreds of entries one of the columns being a numerical value. What I would like to do is to *use a macro* to find out the top 5 values and return the row number of those entries (which I will use for some processing later on). Of course, the brute force such as sticking all the values in an array, sort it and so on does the job, but my feeling is that there must be a clever way to do it. I noticed for example that if I enable the auto filtering on the table I can highlight the top 10 values which is similar if not exactly to what I need. I was also thinking of using the built in function DMAX, but a) how can I invoke it in a macro? b) how can I get the second, third, fourth and fifth value? Anyway, I hope I have been clear in explaining my problem, if not let me know. Cheers, Michele
