[RESOLVED] Excel, possible with formulas? (Now w/ sample sheet)
Okay, so I have a table of data, and then I'm making some sorted lists based on that data. I'm currently using VBA to do these charts and sort them, but I'm wondering if it can be done with formulas.
Let's say I have 3 columns with headers "SalesRep", "Appointments", "Outgoing". Each header is the name of the named ranges below. (i.e. with 7 sales reps, Range("A2:A8") is named "SalesRep". This is true for Appointments and Outgoing as well).
I have 2 charts, 1 for Appointments and 1 for Outgoing.
The Outgoing one I have on a separate sheet. It has 2 columns: Sales Rep, Outgoing. In the Outgoing column I have the formula "=Large(Outgoing,1)" (The number 1 being incremented through 7 to pick up the values)
For the Sales Rep column I use the formula"=INDEX(SalesRep,MATCH(B2,Outgoing,0))"
I can do the same thing for the Appointments column, but more often than not, I will have identical values for Appointments. (I will for calls from time to time, but it's not as likely). My current formula will display the first rep at a given number of appointments, duplicated as many times as there are people at the same number.
Is there a formula based way to do this to avoid the duplication effect?
Edit: Attached a sample worksheet to illustrate what I'm seeing. (Edit, doesn't appear to be showing up.)
Re: Excel, possible with formulas? (Now w/ sample sheet)
I have found my answer.
Code:
=INDEX(SalesRep,SMALL(IF(SALESREP=B8,Row(SalesRep-Row(B$2)+1),COUNTIF(B$8:B8,B8)))
Then I hit Ctrl, Shift, Enter to confirm the formula and copy it down.