Solved

Top 10 items sold

Posted on 2013-06-17
8
214 Views
Last Modified: 2013-06-17
I'm trying to create a list of the top 10 items with this largest sales $$$ in my file. I know a pivot table would be the best approach but I don't want to utilize that for this file. I have a worksheet called "Database" where all my detail is stored. I'm using this formula to find the list but I also need to add a variable to it and only find the top 10 where column D = the value in cell A1. So when I need it to only look at the rows that the value in column D is the same in cell Al. So I need to modify this formula to account for this variable. Any ideas?

Column B = Item
Column I = Total Sales $$$

INDEX(B:B,MATCH(LARGE(I:I,ROW()-2),I:I,0))

Open in new window

0
Comment
Question by:Lawrence Salvucci
  • 4
  • 4
8 Comments
 
LVL 23

Expert Comment

by:NBVC
ID: 39253109
Perhaps?

=INDEX(B:B,MATCH(1,INDEX((I:I=LARGE(I:I,ROW()-2))*(D:D=A1),0),0))

but you may find it more efficient not to use whole column references, and instead limit the column sizes (e.g. B$1:B$1000).... as this is really an array formula.
0
 
LVL 1

Author Comment

by:Lawrence Salvucci
ID: 39253140
That works but how do I get it to find all the top 10 items and not just the top item?
0
 
LVL 23

Expert Comment

by:NBVC
ID: 39253190
Maybe something like:

=INDEX($B$1:$B$10,MATCH(1,INDEX(($I$1:$I$10=LARGE($I$1:$I$10,ROWS($A$1:$A1)))*($D$1:$D$10=$A$1),0),0))

copied down.

adjust ranges to suit.

If still not right, please post sample workbook....
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Author Comment

by:Lawrence Salvucci
ID: 39253211
Ok let me try this new formula first. What is ROWS($A$1:$A1) represent? I didn't have that column in my original formula. Just not sure which column to use for that to try your new formula
0
 
LVL 23

Expert Comment

by:NBVC
ID: 39253246
It's used as an incrementer for the k value in the LARGE() function.

e.g.  ROWS($A$1:$A1) is equal to 1 (so Largest)
 as you copy down, ROWS($A$1:$A2) is equal to 2 (so 2nd largest), etc...
0
 
LVL 1

Author Comment

by:Lawrence Salvucci
ID: 39253438
Ok I've attached a sample worksheet for you. I changed the columns around a bit so I could just create this sample file without all the other stuff that's in the file. But as you can see columns A, B, & C is where the data is. The match for column B is in cell G2. And then I need to list the top 10 items and sales $$$ in columns K & L.
Sample-File.xls
0
 
LVL 23

Accepted Solution

by:
NBVC earned 500 total points
ID: 39253530
Ok,

Try, in L2:

=LARGE((INDEX(($B$14:$B$182=$G$2)*($C$14:$C$182),0)),ROWS($L$2:$L2))

copied down

Then in K2:

=INDEX($A$14:$A$182,MATCH(1,INDEX(($B$14:$B$182=$G$2)*($C$14:$C$182=L2),0),0))

copied down.
0
 
LVL 1

Author Closing Comment

by:Lawrence Salvucci
ID: 39253569
Works like a charm! Thank you for all your help! I greatly appreciate it!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question