SUMIF and SUMIFS Funations Use : Summing Cells Based on Partial Text Matches in Excel Using Wildcard Characters
In Excel, you can use the SUMIF and SUMIFS functions to add cells based on specific criteria. Sometimes, you may need to sum cells based on partial text matches in the dataset. This can be achieved using wildcard characters in Excel, which serve as placeholders for any characters.
There are three wildcard characters in Excel:
Asterisk (*) – Represents any number of characters.
Question mark (?) – Represents a single character.
Tilde (~) – Used to identify a wildcard character in the text.
Here are some practical examples of how to sum cells based on partial text matches using SUMIF and wildcard characters:
Partial Text Matches at the End of the String: Use the asterisk (*) wildcard at the end of the criteria to match cells with specific text at the end of the string.
Example:
less
Copy code
=SUMIF(A2:A16, "*US", B2:B16)
Partial Text Matches at the Start of the String: Use the asterisk (*) wildcard at the start of the criteria to match cells with specific text at the beginning of the string.
Example:
less
Copy code
=SUMIF(A2:A16, "US*", B2:B16)
Partial Text Matches Anywhere in the Cell: Use the asterisk (*) wildcard at both the start and end of the criteria to match cells with specific text anywhere in the cell.
Example:
less
Copy code
=SUMIF(A2:A16, "*US*", B2:B16)
Multiple Criteria and Partial Match: Use the SUMIFS function with wildcard characters to sum cells based on multiple criteria and partial matches.
Example:
less
Copy code
=SUMIFS(C2:C16, A2:A16, "*US", B2:B16, "A")
These examples demonstrate how wildcard characters can be used in combination with SUMIF and SUMIFS functions to sum cells based on partial text matches in Excel.
Comments
Post a Comment