transcript

excelisfun - Excel Magic Trick 1237: Add with "Contains Criteria" or Partial Text Criteria: SUMIFS & Wildcard

Thumbnail of the video “excelisfun - Excel Magic Trick 1237: Add with "Contains Criteria" or Partial Text Criteria: SUMIFS & Wildcard”
Download Markdown
Community upload. AI output has not been independently verified.

Welcome to Excel magic trick number 1,237. Hey, if you want to download this workbook 1,235 to 1,238 and follow along, click on the link below the video. Hey, we have a simple task here today. We need to add with contains criteria or partial text criteria for a number of products. Here's our data set: date, there's the boomerang, sold, and the number. Ah, but we have a category called Bellon. But there's different types of Bellon boomerangs. There's Bellon dancer, Bellon, plastic Bellon, a 12 ply Bellon, which is actually made with 12 plies of birch hardwood in 6 mm. So it's super strong. And then for car, we have various car lotus: 12 ply car, final car. That's an amazing tough, strong, dense plastic cloth-like material. So for example, for Bellon, I need to come over here. I need to count Bellon dancer, Bellon, plastic Bellon. Notice B-E-L-L-O-N is a number of letters. I need to find it at the beginning. I need to find it alone. I need to find it at the end, or anywhere. There could be stuff before and after. This is a relatively simple solution. We're adding with a condition or criteria. So we're going to use the function that Excel has for us, SUMIFS. Now, SUMIFS allows us to add with one or more conditions. We're simply going to add with one condition. The screen tip is polite. It says, hey, sum range, that's the range of values you want to add. Whoops, one too many. Now, I need to copy this formula down and keep it locked on C4 to C16. So I'm going to hit the F4 key to lock it and put those dollar signs in. Now, comma, criteria range one. Here's the entire range of values I need to look for, and find the contains criteria Bellon. I need to lock that also. So I hit the F4 key, comma, here's the criteria. Now, I can't just click on Bellon, because then it would find only, I think, one here, and then add and get a two. I need to add a special wildcard to my formula. Now this cell reference is relative, so that's good as we copy down. But before and after the text Bellon, I need to add a wildcard. And the wildcard is an asterisk, and it has to go in double quotes: double quote, asterisk, double quote. Now it's that asterisk that will tell the formula to find zero or more characters before whatever this E4 is. Now I need to join this. And you can tell that the formula won't work right now, because that cell reference is black. I need to join it. So I use the ampersand, Shift+7. So that will find Bellon with anything before it. But I need to do the same thing at the end. So double quote, asterisk, double quote. So now that is our... now, whoa. Normally when you click on the criteria argument in your screen tip, it highlights everything there. But I don't know why it's not doing it. But that is our contains criteria. It'll find Bellon, or anything with stuff before Bellon, after, or both. Now I can simply close parentheses, Control+Enter. Double-click and send it down. I go to the last cell and hit F2 to make sure I got all the cell references right. Sure enough, that's working. Now if I look at Bellon, I can come over here and it looks like I have two Bellons there, one here, another one. And I'm using the Control key to highlight cells not next to each other. Now I'm going to look down in the status bar, and sure enough, it looks like it is working. All right. So, adding with contains criteria. We'll see you next video.