## How to sum unique values based on criteria in Excel?

For example, I have a range of data which contains Name and Order columns, now, to sum only unique values in Order column based on the Name column as following screenshot shown. How to solve this task quickly and easily In Excel?

**Sum unique values based on one or more criteria with array formulas**

** Sum unique values based on one or more criteria with array formulas**

To sum only unique values based on criteria in another column, please use the below formula:

**1**. Please copy or enter the following array formula into a blank cell:

**=SUM(IF(FREQUENCY(IF($A$2:$A$12=D2,MATCH($B$2:$B$12,$B$2:$B$12,0)),ROW($B$2:$B$12)-ROW($B$2)+1),$B$2:$B$12))**

**Note**: In the above formula, * A2:A12* is the column data contains the condition value,

*is the condition that you want to sum values based on,*

**D2***is the column contains the values that you want to sum.*

**B2:B12****2**. Then, press **Ctrl + Shift + Enter** keys together to get the first total result, and then, select this formula cell and drag the fill handle down to the cells to get all total values for each item. See screenshot:

**Tips**: If you need to sum all the unique values based on two criteria, please apply the below formula:

**=SUM(IF(FREQUENCY(IF($A$2:$A$12=E2,IF($B$2:$B$12=F2,MATCH($C$2:$C$12,$C$2:$C$12,0))),ROW($C$2:$C$12)-ROW($C$2)+1),$C$2:$C$12))**

** More relative articles:**

**Sum Multiple Columns Based On Single Criteria In Excel**- In Excel, you may always need to sum multiple columns based on one criteria. For example, I have a range of data as following screenshot shown, now, I want to get the total values of KTE in three months - Jan, Feb and Mar.

**Vlookup And Sum Matches In Rows Or Columns In Excel**- Using vlookup and sum function helps you quickly find out the specified criteria and sum the corresponding values at the same time. In this article, we are going to show you two methods to vlookup and sum the first or all matched values in rows or columns in Excel.

**Sum Values Based On Month And Year In Excel**- If you have a range of data, column A contains some dates and column B has the number of orders, now, you need to sum the numbers based on month and year from another column. In this case, I want to calculate the total orders of January 2016 to get the following result. And this article, I will talk about some tricks to solve this job in Excel.

**Sum Values Based On Text Criteria In Excel**- In Excel, have you ever tried to sum values based on another column of text criteria? For example, I have a range of data in worksheet as following screenshot shown, now, I want to add up all the numbers in column B corresponding with the text values in column A that meet a certain criterion, such as sum the numbers if the cells in column A contains KTE.

**Sum Values Based On Selection Of Drop-Down List In Excel**- As below screenshot shown, you have a table contains a Category column and an Amount column, and you have created a data validation drop-down list which contains all the categories. When selecting any kind of category from the drop-down list, you want to sum up all corresponding cell values in Column B and populate the result in a specified cell. For example, when selecting category CC from the drop-down list, you need to sum values in cell B5 and B8 and get the total number 40+70=110. How to achieve it? Method in this article can help you.

## The Best Office Productivity Tools

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

- 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 and Keeping Data; Split Cells Content; Combine Duplicate Rows and Sum/Average... 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...
- Favorite and Quickly Insert Formulas, Ranges, Charts and Pictures; Encrypt Cells with password; Create Mailing List and send emails...
- 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...
- Pivot Table Grouping by week number, day of week and more... Show Unlocked, Locked Cells by different colors; Highlight Cells That Have Formula/Name...

**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!