[users] finding the Top 5 values in a database

2006-01-04 Thread Michele Zarri
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 numeri

Re: [users] finding the Top 5 values in a database

2006-01-04 Thread Andrew Douglas Pitonyak
Michele Zarri wrote: 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 th

Re: [users] finding the Top 5 values in a database

2006-01-05 Thread Michele Zarri
Hello Andrew, thanks for your reply. In the meanwhile I made some progress (?) but I am stuck on something: I "discovered" that I could use this formula to do exactly what I need: =INDEX(myTable; MATCH(LARGE(myValuesColumn;rank);myValuesColumn;0); theColumnOfMyTableIWant) where LARGE returns the n

Re: [users] finding the Top 5 values in a database

2006-01-05 Thread Andrew Douglas Pitonyak
When you mentioned a "database" in the header, I assumed a database rather then using Calc If you really want to call functions directly form a macro, use the FunctionAccess service. *oFunction = CreateUnoService("com.sun.star.sheet.FunctionAccess")* This link alludes to how you would use