In worksheet "backup" I have a range A2:D10000. In column A is a list of names. In column D is a list of numbers. There are multiple instances of the same name in column A. For example, "Josie" appears 12 times.
On the same worksheet I have a classlist which appears in range F2:F40. I need to calculate the number that appears most often relative to each student. That figure needs to appear in cells G2:G40.
In cells H2:H40 I would like the second most common number to appear; in cells i2:i40 I would like the third most common number.
Is this something that can be achieved with a formula?
Thanks in advance
You could put this in G2:
and drag fill down and then to the right.
However, I have assumed the numbers are between 1 and 7 inclusive and integers.
also this really probably won't work if you have duplicate counts for a student. for example if had
then you would get 4 in column G and 4 in column H. Since I am using Match it won't break ties. To get beyond that, would probably add require quite a bit more work.
I don't know what your limitations are. It can certainly done with a macro. It may also be possible to use some additional columns to get intermediate results.
You can send me a sample file to firstname.lastname@example.org and say how you want to proceed.
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here