{"id":2779,"date":"2020-11-24T17:08:20","date_gmt":"2020-11-24T16:08:20","guid":{"rendered":"https:\/\/importsheet.com\/?p=2779"},"modified":"2025-12-17T23:38:27","modified_gmt":"2025-12-17T22:38:27","slug":"formule-if-google-sheets","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/fr\/blog\/google-sheets-formulas\/if-formula-google-sheets\/","title":{"rendered":"Comment utiliser la fonction IF dans Google Sheets ?"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; module_class=&#8221;sheetgo-post&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; da_is_popup=&#8221;off&#8221; da_exit_intent=&#8221;off&#8221; da_has_close=&#8221;on&#8221; da_alt_close=&#8221;off&#8221; da_dark_close=&#8221;off&#8221; da_not_modal=&#8221;on&#8221; da_is_singular=&#8221;off&#8221; da_with_loader=&#8221;off&#8221; da_has_shadow=&#8221;on&#8221; da_disable_devices=&#8221;off|off|off&#8221;][et_pb_row admin_label=&#8221;row&#8221; _builder_version=&#8221;4.20.2&#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.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">IF follows an else if logic and is one of the most useful Google Sheets functions. You can use it to perform<\/span><b> logical<\/b> <b>tests<\/b><span style=\"font-weight: 400;\"> on your spreadsheets. Allowing you to carry out different actions if the test result is TRUE or FALSE.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Essentially, you tell the function: If a cell meets certain criteria, do X, if it doesn\u2019t then do Y.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We will cover how to use nested IF statements and how to combine it with other functions like <\/span><span style=\"font-weight: 400;\">AND<\/span><span style=\"font-weight: 400;\">, and <\/span><span style=\"font-weight: 400;\">OR<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;syntax&#8221; _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>Syntax<\/h2>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span><strong>=IF(logical_expression, value_if_true, value_if_false)<\/strong><\/span><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>logical_expression<\/b><span style=\"font-weight: 400;\"> \u2013 the expression to evaluate as <\/span><b>TRUE<\/b><span style=\"font-weight: 400;\"> or <\/span><b>FALSE<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>value_if_true<\/b><span style=\"font-weight: 400;\"> \u2013 the value that the function returns if <\/span><b>logical_expression <\/b><span style=\"font-weight: 400;\">is TRUE. This can be a number, text, or even another formula.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>value_if_false<\/b><span style=\"font-weight: 400;\"> \u2013\u00a0 the value that the function returns if <\/span><b>logical_expression <\/b><span style=\"font-weight: 400;\">is FALSE. This can be a number, text, or even another formula. If not included, it will return a blank value.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">This flowchart explains the internal logic of the IF function.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/IF-function-1.png&#8221; alt=&#8221;IF function 1&#8243; title_text=&#8221;IF function 1&#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_image][et_pb_text module_id=&#8221;how&#8221; _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<ul><\/ul>\n<h2>How to use Google Sheets IF function<\/h2>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;example1&#8243; _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<ul><\/ul>\n<h3>Example 1: Regular IF statements<\/h3>\n<p><span style=\"font-weight: 400;\">The easiest way to understand the IF function is to see it in action.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Take a look at the following sample data (columns A through E). In column F you can see some common variations of the function.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You will notice that I have experimented with Boolean values (TRUE or FALSE), dates, numbers, and also text.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/IF-function-2.png&#8221; alt=&#8221;IF function 2&#8243; title_text=&#8221;IF function 2&#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_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">There are two rows for each example, to show both results of the function if the value is true or false. To get started, let\u2019s go over the formula in the first two rows.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">=IF(E2=\u201dYes\u201d, \u201dOn Campus\u201d, \u201dNot On Campus\u201d)<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">In simple terms, I am telling the function \u201cIf the value in cell E2 is \u2018Yes\u2019 the output should be \u2018On Campus\u2019, otherwise it should be \u2018Not On Campus\u2019 \u201c.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">By taking a look at all of the examples, you will get an idea of the versatility of the IF function. You can use it with just about any other function: you can see the DATE function in rows 6 &amp; 7, and the LEN (length of a text string) function in rows 8 &amp; 9.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">It can also use a variety of logical tests to evaluate whether an expression is TRUE or FALSE. The logical tests that you can use can be seen below.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/IF-function-3.png&#8221; alt=&#8221;IF function 3&#8243; title_text=&#8221;IF function 3&#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_image][et_pb_text module_id=&#8221;example2&#8243; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3><span style=\"font-weight: 400;\">Example 2: IF statements with a calculation as the result<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">You can also use an IF statement to return a mathematical calculation.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In the following example, I\u2019m evaluating the final grade of a group of students, based on whether or not they receive bonus marks. If they do, their final grade will increase by the percentage indicated, and if they don\u2019t, their final grade will stay the same.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/IF-function-4-1.png&#8221; alt=&#8221;IF function 4&#8243; title_text=&#8221;IF function 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_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">Notice that in this case, the <\/span><b>value_if_true<\/b><span style=\"font-weight: 400;\"> is actually a calculation that the function must perform.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">=IF(C2=\u201dYes\u201d, B2+B2*D2, B2)<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;example3&#8243; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Example 3: Nested IF statements<\/h3>\n<p><span style=\"font-weight: 400;\">An IF formula within another IF formula is known as a nested IF statement. You can see the logic in the diagram below.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/IF-function-5.png&#8221; alt=&#8221;IF function 5&#8243; title_text=&#8221;IF function 5&#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_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">As this flowchart shows, there\u2019s a nested IF within the<\/span><b> value_if_false<\/b><span style=\"font-weight: 400;\">. It could have been nested within the <\/span><b>value_if_true<\/b><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In my example, if the IF test for <\/span><b>Expression-1<\/b><span style=\"font-weight: 400;\"> is FALSE, the function goes to the next test: the nested IF function. Accordingly, it returns either B or C based on whether the test for <\/span><b>Expression-2<\/b><span style=\"font-weight: 400;\"> is TRUE or FALSE.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This diagram shows a single nested IF statement. But you can also nest <\/span><span style=\"font-weight: 400;\">multiple IF statements in Google Sheets<\/span><span style=\"font-weight: 400;\">. This means adding multiple IF functions in a hierarchical fashion.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The example below uses an IF statement to evaluate how much experience each worker has.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/IF-function-6.png&#8221; alt=&#8221;IF function 6&#8243; title_text=&#8221;IF function 6&#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_image][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>=IF(B2=0, \u201dNo experience\u201d, IF(B2&lt;4, \u201dSome experience\u201d, \u201dLots of experience\u201d))<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">Again, in simple terms, I\u2019m telling the function \u201cEvaluate if B2 is 0, if it\u2019s TRUE output \u2018No experience\u2019, if it\u2019s FALSE continue to the next IF statement. Evaluate if B2 is less than 4, if it\u2019s TRUE output \u2018Some experience\u2019, if it\u2019s FALSE output \u2018Lots of experience\u2019 \u201d.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;example4&#8243; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3><span style=\"font-weight: 400;\">Example 4: IF functions with AND &amp; OR functions<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">The AND and OR logical functions in Google Sheets can be used in combination with the IF function. These two expressions are fairly self-explanatory:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">AND evaluates multiple criteria and returns TRUE if all of them are TRUE.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">OR evaluates multiple criteria and returns TRUE if one of them is TRUE.<\/span><\/li>\n<\/ul>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h5><span style=\"font-weight: 400;\">IF with AND function<\/span><\/h5>\n<p><span style=\"font-weight: 400;\">Here\u2019s an example of an IF function that also uses an AND function.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>=IF(AND(B2&gt;19, B2&lt;24), \u201dEarly 20\u2019s\u201d, IF(AND(B2&gt;23, B2&lt;27), \u201dMid 20\u2019s\u201d, IF(AND(B2&gt;26, B2&lt;30), \u201dLate 20\u2019s\u201d, \u201dNot in their 20\u2019s\u201d)))<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/IF-function-7.png&#8221; alt=&#8221;IF function 7&#8243; title_text=&#8221;IF function 7&#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_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">The AND function enables testing against two criteria in my logical test: a minimum value and a maximum value. By doing so, I can separate the ages into segments: \u201cEarly 20s\u201d, \u201cMid 20s\u201d, and \u201cLate 20s\u201d.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Notice that I\u2019ve also included \u201cNot in their 20s\u201d as the value_if_false at the end of the formula. This ensures that data that doesn\u2019t fit the established criteria (ages not in the 20s) will still have an output that makes sense.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Check out our post on the <\/span><a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/and-formula-google-sheets\/\"><span style=\"font-weight: 400;\">AND function<\/span><\/a><span style=\"font-weight: 400;\"> for a complete overview including other use cases.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h5><span style=\"font-weight: 400;\">IF with OR function<\/span><\/h5>\n<p><span style=\"font-weight: 400;\">I\u2019ll now show an example using the OR function within an IF statement. This evaluates the overall experience of workers: anyone above the age of 25 or with more than 4 years of work experience, is considered \u201cexperienced\u201d.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">=IF(OR(B2&gt;25, C2&gt;4), \u201cExperienced\u201d, \u201cNot experienced\u201d)<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/IF-function-8.png&#8221; alt=&#8221;IF function 8&#8243; title_text=&#8221;IF function 8&#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_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">Note the difference between this example and the previous one. Here, I want the value to be TRUE if either criteria is met, so I use the OR function. If I want the value to be TRUE only if all criteria are met, so I used the AND function.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Check out our article on the <\/span><a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/or-formula-google-sheets\/\"><span style=\"font-weight: 400;\">OR function<\/span><\/a><span style=\"font-weight: 400;\"> for a full explanation and more examples.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;ifs&#8221; _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2><span style=\"font-weight: 400;\">IFS Function<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">The IF function helps you apply logical functions to your spreadsheet data through simple TRUE or FALSE evaluations. Nested IFs can be used when you want to test data against multiple criteria, but make formulas hard to read.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Luckily there\u2019s an alternative to nested IF statements: <\/span><a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/ifs-formula-google-sheets\/\"><span style=\"font-weight: 400;\">the IFS function in Google Sheets<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.22.2&#8243; background_color=&#8221;#f9f9ff&#8221; custom_margin=&#8221;40px||40px||false|false&#8221; custom_padding=&#8221;15px|25px|15px|25px|true|true&#8221; border_width_left=&#8221;3px&#8221; border_color_left=&#8221;#808e95&#8243; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><em><strong>Editor\u2019s note<\/strong>: This is a revised version of a previous post that has been updated for accuracy and comprehensiveness.<\/em><\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>IF follows an else if logic and is one of the most useful Google Sheets functions. You can use it to perform logical tests on your spreadsheets. Allowing you to carry out different actions if the test result is TRUE or FALSE. Essentially, you tell the function: If a cell meets certain criteria, do X, [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":27672,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"Among the myriad formulas that Google Sheets provides, probably the <a href=\"https:\/\/support.google.com\/docs\/answer\/3093364?hl=en\">IF<\/a> formula is one of the most widely used. It returns a value through an if-then-else logical construct. First, it evaluates the given logical expression. Then Based on whether the evaluation is TRUE or FALSE, the formula returns the first value, or the second respectively. The process is illustrated in the flow chart below.\n\n<img class=\"aligncenter wp-image-2782\" src=\"https:\/\/sheetgo.com\/wp-content\/uploads\/2017\/03\/IF-Formula-Illustration-1-1024x584.png\" alt=\"IF Formula - Illustration 1\" width=\"512\" height=\"292\" \/>\n<h3>Syntax<\/h3>\n<span style=\"font-family: courier new,courier,monospace; font-size: 14pt;\"><strong>IF(logical_expression, value_if_true, value_if_false)<\/strong><\/span>\n<ul>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>logical_expression<\/strong><\/span> - an expression or reference to a cell containing an expression that evaluates to either <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>TRUE<\/strong><\/span> or <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>FALSE<\/strong><\/span>.<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>value_if_true<\/strong><\/span> - the value that the formula returns if the <strong><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\">logical_expression<\/span><\/strong> evaluates to TRUE. This can be a number, text, or even another formula that returns a value. We can also embed another IF formula in here, as part of the nested IF constructs that we will see in a while.<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>value_if_false<\/strong><\/span> - this is the value that the IF formula returns if the <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>logical_expression<\/strong><\/span> evaluates to FALSE. Similar to the <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>value_if_true<\/strong><\/span>, this can be a number, text or another formula that returns a value. It can also be another embedded IF formula. Please note that it is an optional input and if we ignore this, we get a blank value in return.<\/li>\n<\/ul>\n<h3>Usage: IF Formula<\/h3>\n<h5>Use case # 1: Regular IF formula constructs<\/h5>\nExamples always help us understand the concepts better. So, I used the following sample data (columns A through E). And, I tried a few common variations of the formula (column F). You will notice that we have experimented with the Boolean values, dates, numbers, and also text.\n\n<img class=\"aligncenter size-full wp-image-2787\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/if1.png\" alt=\"IF Formula - Illustration 2\" width=\"1213\" height=\"411\" \/>\n<h5>Use case # 2: Nested IF formula constructs<\/h5>\nThis is a scenario where we embed IF formulas within IF formulas. And we come across this more often than not. We demonstrate it diagrammatically below.\n\n&nbsp;\n\n<img class=\"aligncenter wp-image-2800\" src=\"https:\/\/sheetgo.com\/wp-content\/uploads\/2017\/03\/IF-Formula-Illustration-3.png\" alt=\"IF Formula - Illustration 3\" width=\"640\" height=\"426\" \/>\n\nAs explained in the above flow chart, we nested an IF within the <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>value_if_false<\/strong><\/span>. Similarly, if need be, we can also nest an IF within the <strong><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\">value_if_true<\/span><\/strong>. So, if the <strong>Expression-1<\/strong> evaluates to FALSE, the control moves to evaluate the nested IF function. Accordingly, it returns either B or C based on whether the <strong>Expression-2<\/strong> evaluates to either TRUE or FALSE respectively.\n\nAlso the diagram is the case for single level nesting. But, we can also try multi-level nesting, i.e. multiple IF formulas placed in a hierarchical fashion. Consider the examples below to understand this concept better.\n\n<img class=\"aligncenter size-full wp-image-2795\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/if2.png\" alt=\"IF Formula - Illustration 4\" width=\"1206\" height=\"196\" \/>","_et_gb_content_width":"","footnotes":""},"categories":[54],"tags":[55,39,28],"class_list":["post-2779","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-sheets-formulas","tag-ben-collins","tag-connections-t","tag-spreadsheets"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts\/2779","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=2779"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts\/2779\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/media\/27672"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/media?parent=2779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/categories?post=2779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/tags?post=2779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}