Count Data Using VLOOKUP

pwill

Active Member
Joined
Nov 22, 2015
Messages
406
Hi,

Can anyone one help?

I want to use a formula in Cell L5 (Sheet1) to lookup Sam on (sheet2 column A) and count how many times the number 0 appears in column B using only the rows for Sam.

I want to be able to drag the formula down so that in Cell L6 (Sheet1) lookup Finds John on (sheet2 column A) and counts how many times the number 1 appears in column B using only the rows for John.

And drag the formula down again so that in Cell L7 (Sheet1) lookup Finds Peter on (sheet2 column A) and counts how many times the number 2 appears in column B using only the rows for Peter.

ie
I have put the count for each person (blue L5:L7) from sheet2

Sheet1

J
KLMNOPQRS
Name
No.Count

5
Sam
02
6John14
7Peter23
8
9
10
11
12

<tbody>
</tbody>


Sheet2



A
BCDEFGHI











2

Name








3
Sam
1
0134


4
Sam
00

4
5
Sam
1133
6
Sam
01
22
7
John111
2
8
John01

4
9
John10
23
10
John1
11

11
John11123
12
Peter23


13
Peter21112
14
Peter102
4
15
Peter2

2
16
Peter10145
17






18






19






20







<tbody>
</tbody>

Any help would be apprieciated

pwill
 
Last edited:

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,215,064
Messages
6,122,936
Members
449,094
Latest member
teemeren

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