{"id":31221,"date":"2021-02-09T17:03:42","date_gmt":"2021-02-09T16:03:42","guid":{"rendered":"https:\/\/blog.sheetgo.com\/?p=31221"},"modified":"2021-02-09T17:03:42","modified_gmt":"2021-02-09T16:03:42","slug":"sumif-excel","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/fr\/blog\/excel-functions\/sumif-excel\/","title":{"rendered":"Comment utiliser la fonction SUMIF dans Excel"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; module_class=&#8221;sheetgo-post&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_row _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>People often use Microsoft Excel for highly sophisticated and complex calculations. At other times, you may just want to use Excel to add up certain data points. While the SUM function is perfect for doing just that, what happens when you don\u2019t want to tally all the data in your spreadsheet? In that case, you can use <a href=\"https:\/\/support.microsoft.com\/en-us\/office\/sumif-function-169b8c99-c05c-4483-a712-1697a653039b\" target=\"_blank\" rel=\"noopener noreferrer\">the SUMIF function<\/a> to tell your spreadsheet which data to add, and which to ignore.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Syntax<\/h3>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.16&#8243; border_width_left=&#8221;4px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]=SUMIF(range, criteria, [sum_range])[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<ul>\n<li><b>range<\/b> is the group of cells you wish to add up<\/li>\n<li><b>criteria<\/b> is the characteristic that will decide whether or not each cell gets included. This can be an expression, number, cell reference, or text string<\/li>\n<li><b>sum_range<\/b> is an optional parameter that specifies the cells to add up. If left out, the default is to add up the cells in the range that meet the criteria<\/li>\n<\/ul>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>How to use the SUMIF Excel function<\/h3>\n<p>I\u2019ll show some examples to demonstrate how to use the SUMIF Excel function to add up data in any way you want.<\/p>\n<p>In the examples, I use data from a fictional department store, with sales numbers for different employees in various departments.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>Critera with logical operator<\/h4>\n<p>Take a look at the first example below. I want to find the total number of sales by all employees who had more than $10,000 in sales.<\/p>\n<p>Right away, you can see that I can\u2019t simply add up the sales numbers in column C. Doing this would include the sales of employees who had less than $10,000 in sales.<\/p>\n<p>I could manually select all the sales numbers that fit my criteria, but this would be time-consuming, especially in a large dataset. So instead, I type <b>=SUMIF(C2:C11,&#8221;&gt;10000&#8243;)<\/b>.[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/02\/1.-SUMIF-Logical-operator-example.png&#8221; alt=&#8221;sumif excel 1&#8243; title_text=&#8221;1. SUMIF Logical operator example&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>I use the greater than <b>&#8220;>&#8221;<\/b> logical operator in this example, but you can use any of the logical operators shown below.<\/p>\n<p>Just make sure to put the criteria in quotation marks when using a logical operator.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/02\/2.-SUMIF-Logical-Operators.png&#8221; alt=&#8221;sumif excel logical operators 2&#8243; title_text=&#8221;2. SUMIF Logical Operators&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>Critera as text string<\/h4>\n<p>In the next example, I\u2019ll show a different type of criteria. This time, I\u2019m filtering the data based on the department in which the employee works.<\/p>\n<p>Specifically, I want to determine the total sales of employees in the Food department. I achieve this with the formula <b>=SUMIF(B2:B11,&#8221;Food&#8221;,C2:C11)<\/b>.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/02\/3.-SUMIF-text-string-example.png&#8221; alt=&#8221;sumif excel text string 3&#8243; title_text=&#8221;3. SUMIF text string example&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>There\u2019s a couple of differences between these two examples. Firstly, the criteria in the second example is not numerical \u2013 it\u2019s a text string. The function searches the range for the string \u201cFood\u201d and adds up all the sales of the corresponding cells.<\/p>\n<p>That brings me to the second difference: because I\u2019m adding up data from a different column than where I\u2019m applying the criteria, I have to use the <b>sum_range<\/b> parameter.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>Criteria as cell reference &#038; multiple SUMIFs<\/h4>\n<p>Now I\u2019ll show another way to specify your criteria: using a cell reference. Instead of typing out the department I want, I\u2019ve just selected a cell that contains that department as my criteria parameter. This saves a bit of time compared to typing out the text string.<\/p>\n<p>You\u2019ll notice that I\u2019m also using two separate SUMIF functions added together. The reason for that is in this example, I wish to find the total sales of the clothing and hardware departments. I can simply add two SUMIF functions together to achieve this, with the formula <b>=SUMIF(B2:B11,B6,C2:C11) + SUMIF(B2:B11,B8,C2:C11)<\/b>.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/02\/4.-SUMIF-cell-reference-example.png&#8221; alt=&#8221;sumif excel cell reference 4&#8243; title_text=&#8221;4. SUMIF cell reference example&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>Concatenated criteria<\/h4>\n<p>Now I\u2019ll try something a bit more fancy. In the first example, I showed how to use logical operators to specify which cells to add. I\u2019ll do the same thing here, but with a combination of a logical operator and a cell reference combined using concatenation.<\/p>\n<p>This is useful in a spreadsheet that you\u2019re using dynamically \u2013 for instance, if you want to quickly change the criteria by changing one cell, and have the function adjust automatically.<\/p>\n<p>In this example, I want to find the total sales of all employees who had less than $9,000 in sales, but I want the spreadsheet to be dynamic so I can easily put a new number in cell F1 to change the criteria. I do this with the formula <b>=SUMIF(C2:C11,&#8221;<\"&#038;F1)<\/b>.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/02\/5.-SUMIF-Concatenate-example.png&#8221; alt=&#8221;sumif excel concatenate 5&#8243; title_text=&#8221;5. SUMIF Concatenate example&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Notice how I concatenated (combined) the F1 cell with the criteria in the function by using the &#038; sign. Also note that I had to put quotation marks around the < sign, but not around the rest of the criteria.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>Wildcards<\/h4>\n<p>By now, you hopefully understand the basics of how the SUMIF function in Excel works. Which means it\u2019s a good time for me to introduce wildcards.<\/p>\n<p>You can use the wildcard characters * and ? within your criteria to indicate a match with any character (?) or any sequence of characters (*).<\/p>\n<p>I\u2019ll first give an example with the * wildcard. As I mentioned above, this wildcard is a stand-in for any characters. So if my <b>criteria<\/b> was just *, then any cells with data in them would qualify (only blank cells would be left out). That\u2019s a good way to eliminate blanks in your dataset.<\/p>\n<p>Another good use of the wildcard is shown in the example below. In this case, I want to get the total sales from all employees whose names end with \u201cy\u201d.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/02\/6.-SUMIF-_-example.png&#8221; alt=&#8221;sumif excel 6&#8243; title_text=&#8221;6. SUMIF _ example&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>With the formula <b>=SUMIF(A2:A11,&#8221;*y&#8221;,C2:C11)<\/b> I instruct Excel to add up all cells that meet the <b>criteria<\/b> of having any characters followed by a \u201cy\u201d. Note that the * wildcard represents any number of characters, so it doesn\u2019t matter how long the name is as long as it ends in \u201cy\u201d.<\/p>\n<p>Now I\u2019ll contrast that with the ? wildcard. Similar to the * wildcard, this one is a stand-in for any character. The difference is that the ? can only represent a single character.<\/p>\n<p>This example is a bit strange, but imagine I want the sales numbers from only the departments that end in \u201cs\u201d. On top of that, the department names also have to be 11 letters long. So instead of using the * wildcard, I use ? by typing <b>=SUMIF(B2:B11,&#8221;??????????s&#8221;,C2:C11)<\/b>.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/02\/7.-SUMIF-_-example.png&#8221; alt=&#8221;sumif excel 7&#8243; title_text=&#8221;7. SUMIF _ example&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>As I mentioned before, you can use the * wildcard to filter based on blank cells. I\u2019ll demonstrate that in the screenshot below.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/02\/8.-SUMIF-blanks-example.png&#8221; alt=&#8221;sumif excel blanks 8&#8243; title_text=&#8221;8. SUMIF blanks example&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>By typing <b>=SUMIF(B2:B11,&#8221;<>*&#8221;,C2:C11)<\/b> I tell Excel to add up the data for all the cells that are blank. This can be handy in cases where the dataset is incomplete.[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Thanks for reading!<\/h3>\n<p>I hope you now have a good understanding of how you can use the Excel SUMIF function to customize your spreadsheet and use a simple formula to save you time!<\/p>\n<p><span>If you\u2019d like to learn more about the various formulas of Google Sheets, why not take a look at our blog post on the <a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/dsum-formula-google-sheets\/\" target=\"_blank\" rel=\"noopener\">DSUM formula in Google Sheets.<\/a><\/span><\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>People often use Microsoft Excel for highly sophisticated and complex calculations. At other times, you may just want to use Excel to add up certain data points. While the SUM function is perfect for doing just that, what happens when you don\u2019t want to tally all the data in your spreadsheet? In that case, you [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":31267,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[65],"tags":[39,48,28],"class_list":["post-31221","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel-functions","tag-connections-t","tag-excel","tag-spreadsheets"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts\/31221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/comments?post=31221"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts\/31221\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/media\/31267"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/media?parent=31221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/categories?post=31221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/tags?post=31221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}