JustBrowsing305
New Member
- Joined
- Jan 18, 2018
- Messages
- 10
Good Morning,
I've run into a strange scenario that demands a formula that can count an Employee ID under two different conditions, and THEN retrieve the name of the top 5 employees. The table or example that I will be using is shortened because the one I'm working with is too large. It's simple on a Pivottable but I'm trying to include a "Calculation" worksheet where I can link a Word page to extract certain cells. Below is the example table and the dilemma I'm facing:
[TABLE="width: 324"]
<tbody>[TR]
[TD]Current Date:[/TD]
[TD="align: right"]1/18/2018[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Area:[/TD]
[TD]Jacksonville[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Date:[/TD]
[TD]Area:[/TD]
[TD]Employee ID:[/TD]
[TD]Order ID:[/TD]
[/TR]
[TR]
[TD="align: right"]1/17/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EK1[/TD]
[TD="align: right"]55829[/TD]
[/TR]
[TR]
[TD="align: right"]1/17/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EK1[/TD]
[TD="align: right"]55830[/TD]
[/TR]
[TR]
[TD="align: right"]1/17/2018[/TD]
[TD]Miami[/TD]
[TD]58F[/TD]
[TD="align: right"]55831[/TD]
[/TR]
[TR]
[TD="align: right"]1/17/2018[/TD]
[TD]Ocala[/TD]
[TD]30J[/TD]
[TD="align: right"]55832[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EK1[/TD]
[TD="align: right"]55833[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EK1[/TD]
[TD="align: right"]55834[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EJ1[/TD]
[TD="align: right"]55835[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EJ1[/TD]
[TD="align: right"]55836[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EK1[/TD]
[TD="align: right"]55837[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Ocala[/TD]
[TD]30J[/TD]
[TD="align: right"]55838[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EK1[/TD]
[TD="align: right"]55839[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EJ1[/TD]
[TD="align: right"]55840[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EK1[/TD]
[TD="align: right"]55841[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EJ1[/TD]
[TD="align: right"]55842[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]KG1[/TD]
[TD="align: right"]55843[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]KG1[/TD]
[TD="align: right"]55844[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]KG1[/TD]
[TD="align: right"]55845[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]AZ1[/TD]
[TD="align: right"]55846[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]AZ1[/TD]
[TD="align: right"]55847[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]KL1[/TD]
[TD="align: right"]55848[/TD]
[/TR]
</tbody><colgroup><col><col><col><col></colgroup>[/TABLE]
The formula that I'm trying to create will need to do the following:
1) Count the amount of Order IDs ONLY if the "Current Date" matches and the "Area" matches.
2) Retrieve the Five top Employee IDs (with most IDs) and place them in a Descending Order.
Under the example that I used, I know that the Order will be:
1) EK1 with 5 Order IDs
2) EJ1 with 4 Order IDs
3) KG1 with 3 Order IDs
4) AZ1 with 2 Order IDs
5) KL1 with 1 Order IDs.
I apologize if I'm seeming lazy however the worksheet I'm working with has 1,360 different Employee IDs and 34,547 different order IDs. I can't use a pivottable because I need to keep certain cells locked in my "calculation" sheet. I only need a formula that shows me the top 5 under the two conditions. Thank you in advance to anyone who reads this.
I've run into a strange scenario that demands a formula that can count an Employee ID under two different conditions, and THEN retrieve the name of the top 5 employees. The table or example that I will be using is shortened because the one I'm working with is too large. It's simple on a Pivottable but I'm trying to include a "Calculation" worksheet where I can link a Word page to extract certain cells. Below is the example table and the dilemma I'm facing:
[TABLE="width: 324"]
<tbody>[TR]
[TD]Current Date:[/TD]
[TD="align: right"]1/18/2018[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Area:[/TD]
[TD]Jacksonville[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Date:[/TD]
[TD]Area:[/TD]
[TD]Employee ID:[/TD]
[TD]Order ID:[/TD]
[/TR]
[TR]
[TD="align: right"]1/17/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EK1[/TD]
[TD="align: right"]55829[/TD]
[/TR]
[TR]
[TD="align: right"]1/17/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EK1[/TD]
[TD="align: right"]55830[/TD]
[/TR]
[TR]
[TD="align: right"]1/17/2018[/TD]
[TD]Miami[/TD]
[TD]58F[/TD]
[TD="align: right"]55831[/TD]
[/TR]
[TR]
[TD="align: right"]1/17/2018[/TD]
[TD]Ocala[/TD]
[TD]30J[/TD]
[TD="align: right"]55832[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EK1[/TD]
[TD="align: right"]55833[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EK1[/TD]
[TD="align: right"]55834[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EJ1[/TD]
[TD="align: right"]55835[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EJ1[/TD]
[TD="align: right"]55836[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EK1[/TD]
[TD="align: right"]55837[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Ocala[/TD]
[TD]30J[/TD]
[TD="align: right"]55838[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EK1[/TD]
[TD="align: right"]55839[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EJ1[/TD]
[TD="align: right"]55840[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EK1[/TD]
[TD="align: right"]55841[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]EJ1[/TD]
[TD="align: right"]55842[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]KG1[/TD]
[TD="align: right"]55843[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]KG1[/TD]
[TD="align: right"]55844[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]KG1[/TD]
[TD="align: right"]55845[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]AZ1[/TD]
[TD="align: right"]55846[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]AZ1[/TD]
[TD="align: right"]55847[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2018[/TD]
[TD]Jacksonville[/TD]
[TD]KL1[/TD]
[TD="align: right"]55848[/TD]
[/TR]
</tbody><colgroup><col><col><col><col></colgroup>[/TABLE]
The formula that I'm trying to create will need to do the following:
1) Count the amount of Order IDs ONLY if the "Current Date" matches and the "Area" matches.
2) Retrieve the Five top Employee IDs (with most IDs) and place them in a Descending Order.
Under the example that I used, I know that the Order will be:
1) EK1 with 5 Order IDs
2) EJ1 with 4 Order IDs
3) KG1 with 3 Order IDs
4) AZ1 with 2 Order IDs
5) KL1 with 1 Order IDs.
I apologize if I'm seeming lazy however the worksheet I'm working with has 1,360 different Employee IDs and 34,547 different order IDs. I can't use a pivottable because I need to keep certain cells locked in my "calculation" sheet. I only need a formula that shows me the top 5 under the two conditions. Thank you in advance to anyone who reads this.