Solved

Number of Unique Entries Based on Secondary Criteria

Posted on 2014-02-03
6
166 Views
Last Modified: 2014-02-03
I have attached a helper spreadsheet to help explain what I am trying to do...

In column D of Sheet1 I am trying to count the number of unique entries in column D of Sheet2 when Sheet1!A = Sheet2!H

In English...How many different codes did a person use based on the USER_INIT with the result in column D on the row matching each change in user.
HelperFile.xlsx
0
Comment
Question by:sparker1970
  • 2
  • 2
  • 2
6 Comments
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39830460
Use, in D2
=COUNTIF(Sheet2!$H:$H, Sheet1!$A2)

then copy down.

HTH,
Dan
HelperFile-mod.xlsx
0
 
LVL 23

Accepted Solution

by:
NBVC earned 500 total points
ID: 39830483
Try:

=COUNT(1/FREQUENCY(IF(Sheet2!$H$2:$H$3283=A2,IF(Sheet2!$D$2:$D$3283<>"",MATCH(Sheet2!$D$2:$D$3283,Sheet2!$D$2:$D$3283,0))),ROW(Sheet2!$D$2:$D$3283)-ROW(Sheet2!$D$2)+1))

Open in new window


confirmed with CTRL+SHIFT+ENTER not just ENTER and copy down.
0
 

Author Comment

by:sparker1970
ID: 39830500
Sorry Dan...that gives me the total # of entries but not the total # of unique entries
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 23

Expert Comment

by:NBVC
ID: 39830524
Have you tried mine above?

An alternative with Array formula, but uses helper column...

In Sheet2!J2 enter:

=COUNTIFS($D$2:$D2,$D2,$H$2:$H2,$H2)

copied all the way down.

then in D2 of Sheet1:

=COUNTIFS(Sheet2!H:H,A2,Sheet2!J:J,1)

copied down.
0
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39830544
Yup, did not read carefully your question.

NVBC's solution works (the array formula, did not try the helper, but being from NVBC I would say that works too :)
0
 

Author Closing Comment

by:sparker1970
ID: 39830917
Worked perfectly!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question