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

## Generic Formula

`=SUMIF(range, “*text”,sum_range)`

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.

## Example

Considering the example below:

*Figure 1. Excel SUMIF Function*

## Explanation

The formula in E4 is:

`=SUMIF(A2:A8,"*shirt",B2:B8)`

“*shirt” will help to match items in range A2:A8 that end with “shirt”. Then sum the equivalent values in range B2:B8.

## Notes

SUMIF is not case-sensitive function. The criteria “*shirt” matches any text ends with “shirt” or “Shirt” or “SHIRT”.

## Leave a Comment