Finding MAX value using VLOOKUP with many duplicate "IDs" - excel

Using an Excel formula, I'm trying to pull the MAX value for a NAME that has a certain LETTER next to it.
Eg: Highest # for a specific % for each unique Name
So Jeff's Q value would be 7.
(I'm trying to over explain because it makes sense in my mind but it might not make sense to others..)
Name % #
Jeff O 4
Jeff D 3
Jeff Q 4
Jeff O 1
Jeff D 9
Jeff Q 7
Tom O 6
Tom D 7
Tom Q 8
Tom O 2
Tom D 8
Tom Q 3
Peter O 3
Peter D 8
Peter Q 7
Peter O 4
Peter D 10
Peter Q 3
Bob O 2
Bob D 6
Bob Q 10
Bob O 6
Bob D 10
Bob Q 9
Mark O 4
Mark D 7
Mark Q 4
Mark O 7
Mark D 8
Mark Q 1
I can't think of a way to run this without having dedicated worksheets for each person and running MAX on the specific column.
I've tried IF, VLOOKUP and MAX in various configurations but I get nothing.
Has anyone got any experience with this and could please point me in the right direction?

The MAXIFS function should be what you want. For example, assuming that you have your data in columns A:C the formula
=MAXIFS(C:C,A:A,"Jeff",B:B,"Q")
will give you the max number in column C where the value in row A is "Jeff" and the value in row B is "Q".

Related

Return row label for largest & 2nd largest value in criteria range

I have the following table
Name
Point
Bonus
Total
Pos
1st
Name
2nd
Name
Bob
10
8
6
Point
11
10
Sue
9
5
3
Bonus
12
9
Joe
11
2
4
Total
10
7
Susan
7
9
10
Tim
1
12
4
Ellie
9
8
7
In G2 I have the following formula
{=LARGE(IF($B$1:$D$1 =$F2, $B:$D),1)}
Which returns the largest Point value, as 11.
In H2 I want to return the name where the Point value is 11. so the value for H2 should be Joe
Then in J2 want to do the same for the 2nd largest value. So the value of J2 should be Bob
I have used following formulas as per attached scheenshot.
G2=LARGE(INDEX($B$2:$D$7,,MATCH(F2,$B$1:$D$1,0)),1)
H2=INDEX($A$2:$A$7,MATCH(G2,INDEX($B$2:$D$7,,MATCH(F2,$B$1:$D$1,0)),0))
I2=LARGE(INDEX($B$2:$D$7,,MATCH(F2,$B$1:$D$1,0)),2)
J2=INDEX($A$2:$A$7,MATCH(I2,INDEX($B$2:$D$7,,MATCH(F2,$B$1:$D$1,0)),0))
And if you have Microsoft-365 then could try below formula to get names directly.
=LET(x,FILTER($B$2:$D$7,$B$1:$D$1=F2),FILTER($A$2:$A$7,x=LARGE(x,1)))

Soccer Results: Count wins when 4 or more goals scored by speciied team

I have the following in excel:
A B C D E
1 Arsenal 3 v 2 Liverpool
2 Arsenal 4 v 1 Chelsea
3 Liverpool 1 v 1 Spurs
4 Arsenal 3 v 0 Stoke
5 Arsenal 6 v 2 Huddersfield
What I would like to do is count how many occasions Arsenal won then game when they scored 4 or more goals. In the example above I would need to return "2" as they beat Chelsea 4-1 and Huddersfield 6-2.
I have tried countifs, sumifs, sumproducts but I am going round in circles.
Any help would be appreciated. Many thanks, Alan.
If Arsenal can only be in column A then you can use this formula
=SUMPRODUCT((A1:A5="Arsenal")*(B1:B5>D1:D5)*(B1:B5>=4))
....or if Arsenal could also appear in column E (as away team?) then you can use this version
=SUMPRODUCT((A1:A5="Arsenal")*(B1:B5>D1:D5)*(B1:B5>=4)+(E1:E5="Arsenal")*(D1:D5>B1:B5)*(D1:D5>=4))
Countifs() is the formula you need. These are the conditions:
COLUMN A = ARSENAL
COLUMN B > COLUMN D
COLUMN B > 3
Read the documentation here and give it a try once again.

Allocate class based on school ranking

In Excel I am trying to allocate classes to pupils based on their ranking in school. The set of data I have looks like this:
S/N Name LevelPosition
1 Andrea 10
2 Bryan 25
3 Catty 5
4 Debbie 26
5 Ellie 30
6 Freddie 28
I would like to have a formula that could sort the pupils based on the LevelPosition and allocate the class in order of this sequence - A,B,C,C,B,A. Hence the result would be:
S/N Name LevelPosition AllocatedClass
3 Catty 5 A
1 Andrea 10 B
2 Bryan 25 C
4 Debbie 26 C
6 Freddie 28 B
5 Ellie 30 A
This was the sort of thing I had in mind.
Column D is just a ranking from bottom to top:-
=RANK(C2,C$2:C$7,1)
Colum D is adjusted for any ties:-
=D2+COUNTIF(D$1:D1,D2)
Column E is based on the #pnuts formula:-
=CHOOSE(MOD(E2-1,6)+1,"A","B","C","C","B","A")
I've put some ties in to show what would happen. The last two students' allocations are reversed because the second to last has the higher mark.

Excel Finding What Place a Value Comes In

I am trying to find a way to get which place a certain value comes in in a range of other values. Or another way to look at it is I want to turn the SMALL function inside out. The SMALL function looks like this, "=SMALL(array, k)" where it looks for the k place in an array. I need the find what the k is. I hope that makes sense, but if not here is one more example.
A B C D
1 Kate 12.25 =PLACE($B$1:$B$13,B1) 4
2 Cindy 15.80 =PLACE($B$1:$B$13,B2) 10
3 Mark 11.85 =PLACE($B$1:$B$13,B3) 3
4 Thomas 12.98 =PLACE($B$1:$B$13,B4) 5
5 George 13.58 =PLACE($B$1:$B$13,B5) 7
6 Kim 14.52 =PLACE($B$1:$B$13,B6) 9
7 Tim 11.54 =PLACE($B$1:$B$13,B7) 2
8 Frank 12.99 =PLACE($B$1:$B$13,B8) 6
9 Fran 17.85 =PLACE($B$1:$B$13,B9) 11
10 Caroline 14.25 =PLACE($B$1:$B$13,B10) 8
11 Alex 19.20 =PLACE($B$1:$B$13,B11) 12
12 Lilly 25.20 =PLACE($B$1:$B$13,B12) 13
13 Peter 11.22 =PLACE($B$1:$B$13,B13) 1
Also I can easily do it with VBA, but I do not want to. I want to do it in cell and I do not want to have to sort them first.
RANK function does this, i.e. in your case this formula in row 1 copied down
=RANK(B1,B$1:B$13,1)
The 1 at the end indicates the order of ranking (ascending here). Leave that out and you get descending ranking

count data using two columns as references

Is it possible to count or countif by using a column as the data, a cell for the criteria (or what to match) and range of what to count?
Here is what I am looking at:
A1 B C D E F G H I J K L M N O
2 Running Data Total Count of Tardies (by category)
3 Date Employees Leader Start of Shift Break 1 Lunch Break 2 Employees Start of Shift Break 1 Lunch Break 2 Total
4 1-Jul Abe Sue 15 Abe 0
5 3-Jul Steve Bob 20 Anna 0
6 5-Jul Eve Andy 9 20 Eve 0
7 7-Jul Anna Andy 30 Helen 0
8 15-Jul Abe Sue 15 Mark 0
9 18-Jul Anna Andy 10 Steve 0
10 20-Jul Helen Sue 9 0
11 31-Jul Mark Bob 45 0
I am trying to count the data entered on the left (running data) in each category and having it show based on the Employees on the right (in the orange cells). So Abe should show 1 for Start of Shift, Eve should show 1 for Break 1 and Break 2, and Anna should show 2 for Start of Shift.
I have tried using:
=countif(C:C,$J4,D:D) to get the data from JUST Column D for Start of shift, but it gives and error saying too many arguments for the function have been entered.
Help...
...and Thanks!
Countif will only look at 1 column to decide what to count.
Countifs will look at multiple columns. Your formula would look something like this:
=COUNTIFS($C:$C,$J4,E:E,">0")

Resources