ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Use a vlookup to lookup up and count the amount of unique numbers (https://www.excelbanter.com/excel-discussion-misc-queries/176677-use-vlookup-lookup-up-count-amount-unique-numbers.html)

Greg

Use a vlookup to lookup up and count the amount of unique numbers
 
Can I use a VLOOKUP to return a count of unique values associated with
certain people? Ie. can I use a vlook up to lookup and then count of a number
of unique reference numbers associated with a person called 'John Smith' and
then put that count total in a particular cell?

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc

T. Valko

Use a vlookup to lookup up and count the amount of unique numbers
 
count of a number of unique reference numbers

...........A..........B
1.......Bill........10
2.......John........0
3.......John........0
4.......Sue.......10
5.......Sue.......10
6.......Lisa......20
7......Tom......10
8......John......10
9......John......10
10....John......20

Count unique numbers associated with John.

D1 = John

Try this array formula** :

=COUNT(1/FREQUENCY(IF(A1:A10=D1,IF(B1:B10<"",B1:B10)),B1:B 10))

Result = 3 (0,10,20)

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"Greg" wrote in message
...
Can I use a VLOOKUP to return a count of unique values associated with
certain people? Ie. can I use a vlook up to lookup and then count of a
number
of unique reference numbers associated with a person called 'John Smith'
and
then put that count total in a particular cell?

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc





All times are GMT +1. The time now is 07:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com