## 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, D2 is the condition that you want to sum values based on, B2:B12 is the column contains the values that you want to sum.

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))

### Unlock Excel Magic with Kutools AI

• Smart Execution: Perform cell operations, analyze data, and create charts—all driven by simple commands.
• Custom Formulas: Generate tailored formulas to streamline your workflows.
• VBA Coding: Write and implement VBA code effortlessly.
• Formula Interpretation: Understand complex formulas with ease.

#### 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.

### Best Office Productivity Tools

 🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions… Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ... Super Lookup: Multiple Criteria VLookup  |   Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup .... Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List .... Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ... Featured Features: Grid Focus   |  Design View   |   Big Formula Bar   |  Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells   |  Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ... Top 15 Toolsets:  12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

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