Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to sum values if cell contains text in another cell in Excel?

It is easy to use the SUMIF or SUMIFS function to sum values based on a given criteria in Excel. Besides these two functions, this tutorial also provides an amazing tool to help you sum if cells contain specific text in another cell with only several clicks.

Sum values if cell contains text in another cell with formula
Easily sum values if cell contains text in another cell with an amazing tool

More tutorials for Sum…


Sum values if cell contains text in another cell with formula

Please do with the following formulas to sum values if cell contains text in another cell in Excel.

1. Select a blank cell, copy the below SUMIF formula into it and press the Enter key.

=SUMIF(A2:B10,"*"&D2&"*",B2:B10)

Tip: This SUMIFS formula can also help to solve the problem.

=SUMIFS(B2:B10,A2:A10,"*"&D2&"*")

Note: You can see there is wildcards in above formulas. The asterisk * represents any number of characters. In this case, *KTE* will match the text “KTE” anywhere in a cell, such as KTE A (a cell begins with KTE), A KTE (a cell ends with KTE) as well as A KTE A (KTE is in the middle of texts).


Easily sum values if cell contains text in another cell with an amazing tool

Here highly recommended the Lookup and Sum function of Kutools for Excel for you. You can sum values if cell contains text in another cell with several clicks only. Please do as follows.

Before applying Kutools for Excel, please download and install it firstly.

1. Enable this function by clicking Kutools > Super LOOKUP > LOOKUP and Sum. See screenshot:

2. In the LOOKUP and Sum dialog, please configure the below settings.

  • 2.1) Select the Lookup and sum matched value(s) in row(s) option in the Lookup and Sum Type section;
  • 2.2) In the Lookup values box, select the cells containing the criteria you will sum cells based on (In this case, I select cell D2);
  • 2.3) In the Output Range box, select an empty cell to output the result (Here I select cell E2);
  • 2.4) In the Data table range box, select the whole table data without the header row (Here I select A2:B10);
  • 2.5) Select Return the sum of all matched values in the Options section;
  • 2.6) Click the OK button. See screenshot:

Then a formula is created automatically and the result is populated in selected cell.

  If you want to have a free trial ( 30-day) of this utility, please click to download it, and then go to apply the operation according above steps.


Related articles:

Combine duplicate rows and sum the values in Excel
In Excel, you may always meet this problem, when you have a range of data which contains some duplicate entries, and now you want to combine the duplicate data and sum the corresponding values in another column. How could you solve this problem? The methods in this tutorial will help you solve it.

Sum values based on criteria in another column in Excel
Sometimes you want to sum the values based on criteria in another column, for instance, here I only want to sum up the "Sale Volume" column where the corresponding "Product" column equals "A", how can you do it? Of course, you can sum them one by one, but here I introduce some simple methods for you to sum the values in Excel.

Count and sum cells based on background color in Excel
Supposing you have a range of cells with different background colors, such as red, green, blue and so on, but now you need to count how many cells in that range have a certain background color and sum the colored cells with the same certain color. In Excel, there is no direct formula to calculate Sum and Count of color cells, here this tutorial introduces you some ways to solve this problem.

Sumif adjacent cell is equal, blank or containing text in Excel
While using Microsoft Excel, you may need to sum values where the adjacent cell equals a criterion in a certain range, or sum the values where the adjacent cell is blank or containing text. In this tutorial, we will provide you with formulas to deal with these problems.

More tutorials for Sum…


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.
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 ( Sign Up? )
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.