## Sum values in horizontal range in Excel

To sum numbers in horizontal range based on a condition, you can apply the SUMIFS function.

#### How to sum values in horizontal range in Excel?

Suppose you have an order quantity table as shown in the screenshot below, to sum the total quantity of KTE or KTW sold per day, you can try the following formula.

Generic Formulas

=SUMIFS(sum_range, criteria_ranges, criteria)

Arguments

Sum_range: A range that you want to sum values horizontally based on a criterion.
Criteria_range: The range of cells that you want evaluated by the criteria;
Note: Make sure both the sum_range and criteria_range are the same dimensions.
Criteria: The criterion defines which values in the Criteria_range will be summed.

How to use this formula?

Select a cell, enter the formula below and press the Enter key to get the result. Select this result cell and then drag its AutoFill Handle down then right to get the subtotals of other horizontal ranges,

=SUMIFS(\$C5:\$H5,\$C\$4:\$H\$4,J\$4)

Notes:

1) In the formula, \$C5:\$H5 is the sum range which is a mixed reference with columns locked;
2) \$C\$4:\$H\$4 is the criteria range which is an absolute reference;
3) J\$4 is the cell containing the criteria which is a mix reference with the row locked;
4) You can type the criteria directly into the formula and enclose it in double-quotes.
=SUMIFS(\$C5:\$H5,\$C\$4:\$H\$4,"KTE")

#### Related functions

Excel SUMIFS function
The Excel SUMIFS function helps to sum cell values based on multiple criteria

#### Related formulas

Sum only visible cells or rows in a filtered list
This tutorial demonstrates a formula based on the SUBTOTAL function with a specified function number to help you sum only visible cells in a filtered list in Excel.

Use SUMIFS with multiple criteria based on OR logic
By default, the SUMIFS function handles multiple criteria based on AND logic. If you want to sum multiple criteria based on OR logic, you need to use the SUMIFS function within an array constant.

Use SUMPRODUCT with IF function in Excel
This tutorial is talking about how to use IF logic with SUMPRODUCT function in Excel.

### The Best Office Productivity Tools

#### Kutools for Excel - Helps You To Stand Out From Crowd

 ðŸ¤– 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 VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup... Adv. Drop-down List: Easy 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 Columns to Select Same & Different Cells ... 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 Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

#### Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

• One second to switch between dozens of open documents!
• Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
• Increases your productivity by 50% when viewing and editing multiple documents.
• Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.