vlookup and countif to find the pertaining letter for each student

N8DGR8

New Member
Joined
Dec 15, 2016
Messages
3
I'm sure it's something simple, but it's just not coming to me. I'm assuming I need to combine a vlookup and countif so that i can get a result of how many A's L's or P's that each person has from the range in O1:P12 and place it next to their name in column N

any help would be appreciated, and if it will require VB, I'd rather even use a couple of formulas, that have to reference each other.
John JohnA
MarkJohnL
YvetteJohnP
JohnP
MarkA
MarkA
MarkL
MarkP
YvetteL
YvetteP
YvetteP
YvetteP

<tbody>
</tbody>
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
maybe...

N1=SUM(COUNTIFS($O$1:$O$12,M1,$P$1:$P$12,{"A","L","P"}))

Row\Col
M​
N​
O​
P​
1​
John
4​
JohnA
2​
Mark
4​
JohnL
3​
Yvette
4​
JohnP
4​
JohnP
5​
MarkA
6​
MarkA
7​
MarkL
8​
MarkP
9​
YvetteL
10​
YvetteP
11​
YvetteP
12​
YvetteP

<tbody>
</tbody>
 
Upvote 0
Welcome to the forum!

How about this?


Excel 2016 (Windows) 32 bit
ABCDEFGHIJ
1JohnA1L1P2JohnA
2MarkA2L1P1JohnL
3YvetteA0L1P3JohnP
4JohnP
5MarkA
6MarkA
7MarkL
8MarkP
9YvetteL
10YvetteP
11YvetteP
12YvetteP
Sheet2
Cell Formulas
RangeFormula
C1=COUNTIFS($I$1:$I$12,$A1,$J$1:$J$12,B1)
E1=COUNTIFS($I$1:$I$12,$A1,$J$1:$J$12,D1)
G1=COUNTIFS($I$1:$I$12,$A1,$J$1:$J$12,F1)
 
Upvote 0
that worked perfect Weazel, thank you, I knew it would be something simple that I would make difficult.
 
Upvote 0
I see no point in doing it unless you separate them - you might just as well count pupil names if you don't want to know the break-down, since all results are one of the three!
 
Upvote 0
I see no point in doing it unless you separate them - you might just as well count pupil names if you don't want to know the break-down, since all results are one of the three!

Exactly this. If you're not separating them, you can just use a COUNT statement for each one of them. To get more specific (which is usually ideal in a scenario like this I assume), you would be better off separating them.
 
Upvote 0
unless there is a possibility of there being a letter other than A, L, or P
 
Upvote 0
I'm guessing we are dealing here with absent, late or present - there may be other codes, yes, but we don't know that from the sample data.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,720
Members
448,986
Latest member
andreguerra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top