We use SUMIF function and wildcard asterisk(*) to sum if cells value end with specific text. In this tutorial, you will see how sum if ends with specific text.
Sum if ends with
The parameters of the function are:
range: Required. This will be the range of the values you want to test;
“*text”: Required. Text value you want to match goes with an asterisk wildcard. This means it will try to match any value that ends with “text”;
sum_range: Required. The relevant range of values that you want to sum.
Basically, the formula will test the values in a provided range if they end with “text”, and sum the relevant values in the sum_range.
Considering the example below:
Figure 1. Excel SUMIF Function
The formula in E4 is:
“*shirt” will help to match items in range A2:A8 that end with “shirt”. Then sum the equivalent values in range B2:B8.
SUMIF is not case-sensitive function. The criteria “*shirt” matches any text ends with “shirt” or “Shirt” or “SHIRT”.