View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Find x number of lowest values from a 200 x 200 matrix

Manuel,

The formula that the code inserts after the initial sort and prior to the
second sort counts the previous occurences of the names. In my testing, the
top values never had any repeats. You should be able to get the same
result. It might be a calculation problem - try setting your calculation
mode to automatic. If that doesn't work, try commenting out the line with
the .EntireRow.Delete, and run the code, then do a manual sort of the data,
sorting first on column C, then re-sorting based on column D (use 2 distinct
sorts, not 1 sort with two criteria). If that doesn't work, you can send
me a workbook and I will take a look at it, and perhaps I will be able to
"sort" it out for you.

HTH,
Bernie
MS Excel MVP

"Grotifant" wrote in message
oups.com...
Thanks a lot for this Bernie. It works fine and your code is much more
neat and efficient than my code.
The only problem that I've got left is that there are still multiple
company names in the list (e.g. name1 occurs 3 times).
Do you think it is possible to create the same list but only with the
top 50 pairs where each pair consists of 2 different companies that are
not part of any of the other pairs?

Thanks again,
Manuel