Log in  \/ 
x
or
x
x
Register  \/ 
x

or

How to count unique values with multiple criteria in Excel?

Here is a range of data containing several names, projects and locations, and what need to do is to find out the names which match the criteria I have list, and then count the each matched names once time only as below screenshot shown. Do you have any tricks on solving this job? In this article, I will introduce the tricks.
doc count uniques with criteria 1

Count unique values with multiple criteria with formulas

Count unique values with multiple criteria with Kutools for Excelgood idea3


Here are some formulas can help you to count the unique values with multiple criteria.

1. Copy the name list excluding header and then paste them in another location, and click Data > Remove Duplicates. See screenshot:
doc count uniques with criteria 2

2. In the popping warning dialog, check Continue with the current selection option, click Remove Duplicates button to go to next Remove Duplicates dialog, check the column header you want to remove duplicates, click OK. See screenshot:
doc count uniques with criteria 3

3. Then the duplicate names are removed, and go to next cell beside the first name, I2 for instance, and type this formula =COUNTIFS(A2:A10,$H2,B2:B10,$E$2,C2:C10,$F$2), press Enter key and drag fill handle down to the cells you need to apply this formula. See screenshot:
doc count uniques with criteria 4

Tip: in this formula, A2:A10 is the name list in the original data, and H2 is the first name in the pasted list that you removed duplicates just now, B2:B10 is the list of Project, E2 is the criterion you want to find in Project column, C2:C10 is the Location range, and F2 is the criterion you want to match in Location column, you can change them as you need.

4. Now it list the times of matching the criteria in each name. Select a blank cell where you will place the unique value’s counting result, type this formula =COUNTIF(I2:I7,">0") and press Enter key. See screenshot:
doc count uniques with criteria 5


If you are confused with above formulas, you can apply Kutools for Excel’s Select Specific Cells and Select Duplicate & Unique Cells utilities to quickly handle it without any formulas.

Kutools for Excel, with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

After free installing Kutools for Excel, please do as below:

1. Select Project column range, and click Kutools > Select > Select Specific Cells. See screenshot:
doc count uniques with criteria 6

2. In the Select Specific Cells dialog, check Entire row option, and select Equals from the first drop down list in Specific type section, and enter the first criterion you need to match into the textbox. See screenshot:
doc count uniques with criteria 7

3. Click Ok. A dialog pops out to remind you the number of selected rows, and click OK to close it. Then copy and paste the selected rows to another location. See screenshot:
doc count uniques with criteria 8

4. Select the Location column from the pasted data and reapply apply the Select Specific Cells, and check Entire Row, Equal and enter the second criterion into the textbox, and then click Ok > OK and copy and paste the match rows to another location. See screenshot:
doc count uniques with criteria 9

5. Then select the names in last pasted data, and click Kutools > Select > Select Duplicate & Unique Cells. See screenshot:
doc count uniques with criteria 10

6. In the Select Duplicate & Unique Cells dialog, check All unique (Include 1st duplicates) or Unique values only as you need, check Fill backcolor or Fill font color option, and click Ok. Now a dialog pops out to show you the total number of unique values in the selection, and at the same time matched values are selected and highlighted. See screenshot:
doc count uniques with criteria 11


The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.