{"id":7561,"date":"2021-03-26T11:39:00","date_gmt":"2021-03-26T10:39:00","guid":{"rendered":"https:\/\/www.sheetgo.com\/?p=6202"},"modified":"2021-03-26T11:39:00","modified_gmt":"2021-03-26T10:39:00","slug":"mise-en-forme-conditionnelle-basee-sur-une-autre-cellule-dans-google-sheets","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/fr\/blog\/google-sheets-features\/conditional-formatting-based-on-another-cell-in-google-sheets\/","title":{"rendered":"Comment utiliser une mise en forme conditionnelle bas\u00e9e sur une autre cellule dans Google Sheets ?"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; module_class=&#8221;sheetgo-post&#8221; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;||1px|||&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_row _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#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; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; theme_builder_area=&#8221;post_content&#8221; hover_enabled=&#8221;0&#8243; sticky_enabled=&#8221;0&#8243;]<\/p>\n<p>There are times when you need to look through mounds of data on a spreadsheet, often searching for certain values. However, without any design elements or visual cues, scouring the data can be time consuming and hard on the eyes. Fortunately, with <a href=\"https:\/\/support.google.com\/docs\/answer\/78413?co=GENIE.Platform%3DDesktop&amp;hl=en\" target=\"_blank\" rel=\"noopener\">Google Sheets<\/a> you can use conditional formatting to change the color of the cells you\u2019re looking for based on the cell value. This functionality is called conditional formatting. This can be done based on the individual cell, or based on another cell. I\u2019ll show you how it works with the help of a few examples.<\/p>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8221;Connections B &#8211; Merge, split, filter &#8211; Vertical&#8221; module_class=&#8221;sheetgo-post-no-shadow-img md2-contained-button vertical-banner-container&#8221; _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#8221; text_font=&#8221;||||||||&#8221; background_color=&#8221;#f2f7ff&#8221; max_width=&#8221;700px&#8221; module_alignment=&#8221;center&#8221; max_height=&#8221;300px&#8221; custom_margin=&#8221;20px|0px|20px|0px|true|true&#8221; custom_padding=&#8221;25px|25px|25px|25px|true|true&#8221; sticky_limit_bottom=&#8221;section&#8221; border_radii=&#8221;on|20px|20px|20px|20px&#8221; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#d9e7ff&#8221; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221; global_module=&#8221;50477&#8243; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/connections-top-processors-main.webp\" width=\"250\" height=\"168\" alt=\"\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/Recommended-for-Google-Workspace-badge.webp\" width=\"150\" height=\"180\" alt=\"39\" \/><\/p>\n<p><span style=\"font-size: 22px; font-weight: 600;\">Merge, split, and filter spreadsheets<\/span><br \/><span style=\"color: #878d91; font-size: 18px; font-weight: 600;\">Regardless of the file format, Sheetgo can handle it.<\/span><\/p>\n<p><a href=\"https:\/\/workspace.google.com\/marketplace\/app\/sheetgo\/94172092257\" target=\"_blank\" rel=\"noopener\"><br \/><img decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/available-on-google-workspace-button-text.webp\" width=\"180\" height=\"\" alt=\"\" \/><br \/><\/a><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.27.2&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h3>Different types of conditional formatting<\/h3>\n<h4>Example 1: Identify the cells below a threshold<\/h4>\n<p>I\u2019ll start with a basic example using conditional formatting to change a cell\u2019s color. Consider the following spreadsheet. The warehouse supervisor, at a local automobile service station, uses it to track an inventory of spare parts.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/03\/1-Conditional-formatting.png&#8221; alt=&#8221;Conditional formatting based on another cell 1&#8243; title_text=&#8221;1 Conditional formatting&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.23.1&#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; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>He needs to place a new order for a product if the quantity in stock (column B) falls below the threshold of 20. There are a large number of products and the values in column B change over time. So, he finds it difficult to identify the products that are going out of stock. Even if he were to color the cells manually to easily fish out the cells later, that would double his work \u2013 not an ideal solution!<\/p>\n<p>The conditional formatting functionality comes to the rescue, with which you can change the cell colors based on the cell value in Google Sheets. To apply this formatting, first select all the cells in column B.<\/p>\n<p>Now navigate to <b>Format &gt; Conditional formatting<\/b>. A sidebar opens up on the right side of the screen. You\u2019ll notice that in the <b>Apply to range<\/b> field, the value is already set to B2:B27. This is because that range is already selected. In any case, if you wish to change the range, you can do that.<\/p>\n<p>I\u2019ll choose <b>Less than or equal to<\/b> in the <b>Format cells if<\/b> drop-down field. Then key in the value 20 in the immediate next field. Essentially you are configuring Google Sheets to <a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-features\/format-cells-in-google-sheets-2\/\" target=\"_blank\" rel=\"noopener\">format cells<\/a> in a certain way if it satisfies this condition. I\u2019ll choose a Formatting style that\u2019s red in order to suit the situation. To finish, just click on the <b>Done<\/b> button<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/03\/2-Conditional-formatting.png&#8221; alt=&#8221;Conditional formatting based on another cell 2&#8243; title_text=&#8221;2 Conditional formatting&#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; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>This is just a one-time configuration and automatically updates the formatting even if there are future changes to the data.<\/p>\n<p>I used a direct condition for this particular example. You can also change the cell colors by making use of a formula. For that, you just have to ensure the value in the <b>Format cells if<\/b> drop-down field is <b>Custom formula is<\/b>, and accordingly key in the formula in the immediate next field.<\/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>Example 2: Conditional formatting based on another cell<\/h4>\n<p>Now that you know how to use conditional formatting, let\u2019s look at how to change the color of a cell based on the value in a different cell. I\u2019ll use the same example as before. This time, however, the warehouse supervisor wants the Product ID to be highlighted instead of the Quantity.<\/p>\n<p>To do this, follow all the same steps as before, but select <b>Custom formula is<\/b> from the <b>Format cells if<\/b> drop-down field. Then, type in the formula based on the cell in column B. In this example, I\u2019ve typed =B2<=20.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/03\/3-Conditional-formatting.png&#8221; alt=&#8221;Conditional formatting based on another cell 3&#8243; title_text=&#8221;3 Conditional formatting&#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; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Now I\u2019ve achieved the same highlighting of cells with low inventory, but the Product ID is highlighted instead of the Quantity!<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>Example 3: Formatting with multiple rules<\/h4>\n<p>You don\u2019t need to limit yourself to just one rule when using conditional formatting. Adding multiple conditional formatting rules can help visually dissect your data even further.<\/p>\n<p>In this example, a fifth-grade teacher wants to highlight students whose grades are either below or above a threshold. Specifically, the teacher wants students with an average below 70 in red, and students in the 90\u2019s in green.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/03\/4-Conditional-formatting.png&#8221; alt=&#8221;Conditional formatting based on another cell 4&#8243; title_text=&#8221;4 Conditional formatting&#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>To do this, you need to add two separate rules. The process for each rule is very similar to the previous example.<\/p>\n<p>Because you want the names highlighted based on the average scores, highlight the names as the <b>Apply to range<\/b>, and add the scores by typing the rule into the <b>Custom formula is<\/b> section from the <b>Format cells if<\/b> drop-down field<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/03\/5-Conditional-formatting.png&#8221; alt=&#8221;Conditional formatting based on another cell 5&#8243; title_text=&#8221;5 Conditional formatting&#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>Once you\u2019ve written the first rule, press <b>Done<\/b> and then <b>Add another rule<\/b>. The formulas I used in the rules here are =F2<70 and =F2>=90.<\/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>Example 4: Formatting based on multiple cells<\/h4>\n<p>You can also use conditional formatting based on multiple cells, all within one formatting rule. To do this, you can use the OR or AND functions.<\/p>\n<p>In this example, the teacher wants to consider each individual subject instead of the average. If a student has a grade below 60 in any subject, their name should be highlighted in red so the teacher can quickly see who\u2019s struggling.<\/p>\n<p>The method here is similar to the other examples \u2013 hopefully you\u2019re getting used to it by now! The difference is, in the <b>Custom formula is<\/b> section from the <b>Format cells if<\/b> drop-down field, type =OR(B2<60,C2<60,D2<60,E2<60).<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/03\/6-Conditional-formatting.png&#8221; alt=&#8221;Conditional formatting based on another cell 6&#8243; title_text=&#8221;6 Conditional formatting&#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; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Congratulations! You successfully used conditional formatting to provide visual cues that make the data identification process a lot easier!\n<\/p>\n<p>Learn more about alternated colors in the following blog post: <a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-features\/create-an-alternated-colors-list-in-google-sheets\/\">How to create an alternated colors list in Google Sheets?<\/a><\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are times when you need to look through mounds of data on a spreadsheet, often searching for certain values. However, without any design elements or visual cues, scouring the data can be time consuming and hard on the eyes. Fortunately, with Google Sheets you can use conditional formatting to change the color of the [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":33309,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"There are times when we need to look at mounds of data on our daily spreadsheets. However, without any design elements or visual cues, the scouring the data can be stressful to the eyes. Fortunately, though, we can change the cell colors based on the cell value in Google Sheets application! This functionality is called conditional formatting. Let us explore this with the help of a couple examples.\n<h3>Example 1: Identify the cells below a threshold<\/h3>\nPlease consider the following spreadsheet. The warehouse supervisor, at a local automobile service station, uses it to track inventory of the spares.\n\n<strong>Example<\/strong> <img class=\"aligncenter size-full wp-image-6215\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/change1.png\" alt=\"Change the cell colors based on the cell value in Google Sheets - Illustration 1\" width=\"873\" height=\"590\">\n\nHe needs to place a new order for a product if the quantity in stock (column B), falls below the threshold of 20. There are a large number of products and the values in column B change over time. So, he finds it difficult to identify the products that are going out of stock. Even if he were to color the cells manually to easily fish out the cells later, that would double up his work. So, that is not an ideal solution.\n\nThe conditional formatting functionality comes to our rescue, using which we can change the cell colors based on the cell value in Google Sheets. To apply this formatting, first, we will select all the cells in column B (i.e. range B2:B900).\n\nNow navigate to <strong>Format &gt; Conditional formatting<\/strong>. A sidebar opens up on the right side of the screen. We'll notice that in the <strong>Apply to range<\/strong>&nbsp;field, the value is already set to B2:B900. This is because we have already selected the data. In any case, if we wish to change the range, we can do that.\n\nWe will choose <strong>Less than or equal to<\/strong>&nbsp;for the <strong>Format cells if<\/strong>&nbsp;drop down field. And then, key in the value 20 in the immediate next field. Essentially we are configuring Google Sheets to format cells in a certain way if it satisfies this condition. We'll choose a <strong>Formatting style<\/strong> that's on the reddish side, so as to suit the situation. Finally, we click on the <strong>Done<\/strong> button.\n\n<strong>Example<\/strong> <img class=\"aligncenter size-full wp-image-6217\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/Change2.png\" alt=\"Change the cell colors based on the cell value in Google Sheets - Illustration 2\" width=\"871\" height=\"588\">\n\nTo test if this has worked, let us scroll a little bit and validate. We may close the <strong>Conditional formatting rules<\/strong> sidebar if we wish to.\n\n<strong>Example<\/strong> <img class=\"aligncenter size-full wp-image-6218\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/change3.png\" alt=\"Change the cell colors based on the cell value in Google Sheets - Illustration 3\" width=\"871\" height=\"588\">\n\nYes, it seems to have worked! Furthermore, this is just a one-time configuration and automatically updates the formatting even if there are future changes!\n\nWe used a direct condition for this particular example. We can also change the cell colors based on the cell value in Google Sheets, by making use of a formula as well. For that, we just have to&nbsp;ensure the value in the <strong>Format cells if<\/strong> drop down field is \"<strong>Custom formula is<\/strong>\", and accordingly key in the formula in the immediate next field.\n<h3>Example 2: Heatmaps!<\/h3>\nHere's a spreadsheet that holds the scores of fifth-grade students in a school.\n\n<strong>Example<\/strong> <img class=\"aligncenter size-full wp-image-6221\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/change4.png\" alt=\"Change the cell colors based on the cell value in Google Sheets - Illustration 4\" width=\"871\" height=\"588\">\n\nThe class teacher wants to quickly zero in on those students who scored on the higher side. To the naked eye, this is difficult. Color scale within the conditional formatting functionality can help us here. Just like we did in the previous example, we will select all the cells (F2:F31) and navigate to <strong>Format &gt; Conditional formatting<\/strong>. Then we select the <strong>Color scale<\/strong> tab on the sidebar that pops on the right side of the screen.\n\nWe make sure the fields are as shown in the snapshot below, and click <strong>Done<\/strong>. Instantly we see that the conditional formatting utility did change&nbsp;the cell colors based on the cell value in Google Sheets. Higher values are in green, while the lower values are in red.\n\n<strong>Example<\/strong> <img class=\"aligncenter size-full wp-image-6222\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/change5.png\" alt=\"Change the cell colors based on the cell value in Google Sheets - Illustration 5\" width=\"871\" height=\"609\">\n\nCongratulations! We successfully used the conditional formatting to our benefit to aid our eyes with visual cues that make the data identification process a lot easier!\n\nLearn more about <strong>Alternated Colors<\/strong> in the following blog post: \"<a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-features\/create-an-alternated-colors-list-in-google-sheets\/\"><strong>How to create an alternated colors list in Google Sheets?<\/strong><\/a>\"\n\n<hr>\n\n<span style=\"font-size: 8pt;\"><em><a href=\"http:\/\/www.freepik.com\">Featured image designed by ijeab \/ Freepik<\/a><\/em><\/span>","_et_gb_content_width":"","footnotes":""},"categories":[37],"tags":[39,28],"class_list":["post-7561","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-sheets-features","tag-connections-t","tag-spreadsheets"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts\/7561","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=7561"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts\/7561\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/media\/33309"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/media?parent=7561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/categories?post=7561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/tags?post=7561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}