Sort and Extract

E

Eric_G

I would like to perform the following functions within a macro:

- I start with a long list of rows listing securities within various
portfolios; Column A identifies the name of the portfolio, Column B lists
the name of the underlying security, and Column C lists its weight in the
portfolio
- I wish to sort the list as follows: primary key as Col A (the name of the
portfolio), then descending order of Column C
- I then wish to extract the "top 10" securities of each portfolio in a
simple list

Rather than seeing the entire list of ALL securities in the portfolio, is
there a way to simply extract the "TOP 10"?

Thanks in advance.
 
R

Ron Rosenfeld

I would like to perform the following functions within a macro:

- I start with a long list of rows listing securities within various
portfolios; Column A identifies the name of the portfolio, Column B lists
the name of the underlying security, and Column C lists its weight in the
portfolio
- I wish to sort the list as follows: primary key as Col A (the name of the
portfolio), then descending order of Column C
- I then wish to extract the "top 10" securities of each portfolio in a
simple list

Rather than seeing the entire list of ALL securities in the portfolio, is
there a way to simply extract the "TOP 10"?

Thanks in advance.


After sorting, you could use Filter or Advanced Filter.

In XL2007, Filter has an option for Top 10; but I think even the older versions
have an option for values greater or equal.

If you are using the regular filter, after creating the list, in order to
"extract" it; select the table. Then execute GoTo Special "Visible cells
only". Then Edit/Copy ; select a destination ; edit/paste
--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top