{"id":3365,"date":"2017-03-28T20:07:50","date_gmt":"2017-03-28T23:07:50","guid":{"rendered":"https:\/\/www.sheetgo.com\/?p=3365"},"modified":"2017-03-28T20:07:50","modified_gmt":"2017-03-28T23:07:50","slug":"choisir-une-formule-google-sheets","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/fr\/blog\/google-sheets-formulas\/choose-formula-google-sheets\/","title":{"rendered":"Comment utiliser la formule CHOOSE 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;][et_pb_row admin_label=&#8221;row&#8221; _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.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>We may already be aware of the usability of the<span>\u00a0<\/span><a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/ifs-formula-google-sheets\/\" target=\"_blank\" rel=\"noopener noreferrer\">nested IF<\/a><span>\u00a0<\/span>statements and<span>\u00a0<\/span><a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/switch-formula-google-sheets\/\" target=\"_blank\" rel=\"noopener noreferrer\">SWITCH<\/a>formulas in Google Sheets. Going by the experience, we can conclude that the SWITCH formula is less complicated than that of the nested IF statement. On the similar lines, wouldn\u2019t it be nice if instead of specifying the case every time, we just<span>\u00a0<\/span>specify an index of sorts, and we get the corresponding value? Well, just to help us with that purpose, the Google Sheets application hosts the<span>\u00a0<\/span><a href=\"https:\/\/support.google.com\/docs\/answer\/3093371?hl=en\" target=\"_blank\" rel=\"noopener noreferrer\">CHOOSE<\/a><span>\u00a0<\/span>formula.<\/p>\n<h3>Syntax<\/h3>\n<p><span><strong>CHOOSE(index, choice1, [choice2, \u2026])<\/strong><\/span><\/p>\n<ul>\n<li><span><strong>index<\/strong>\u00a0<\/span>\u2013 this specifies the choice number. If it is 1, the CHOOSE formula returns the<span>\u00a0<\/span><span><strong>choice1<\/strong><\/span>. Similarly, if it is 3, we get<span>\u00a0<\/span><span><strong>choice3<\/strong><\/span><span>\u00a0<\/span>in return. Please note that the Google Sheets allows up to 30 index values, starting from 1.<\/li>\n<li><span><strong>choice1<\/strong><\/span><span>\u00a0<\/span>\u2013 the formula returns this when the index value is 1. It can be a simple text, number, reference to another cell, or even a full-fledged formula.<\/li>\n<li><span><strong>choice2<\/strong>\u00a0<\/span>\u2013 additional and optional parameters similar to that of<span>\u00a0<\/span><span><strong>choice1<\/strong><\/span>.<\/li>\n<\/ul>\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<h3>Usage: CHOOSE Formula<\/h3>\n<p>Let us start with the basic example that returns the weekday based on the index number. In the snapshot below, you can see the various combinations of the formula that we tried.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/CHOOSE-formula-1.png&#8221; alt=&#8221;CHOOSE formula 1&#8243; title_text=&#8221;CHOOSE formula 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 _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span>Like we mentioned above,\u00a0<\/span>the\u00a0range of the index values can only start from 1 and can\u2019t exceed the total number of choices within the formula<span>. What happens if we try to force that? It coughs up errors of course! Let us try that firsthand. Below is the snapshot that demonstrates the outcome of using the index value 0.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/CHOOSE-formula-2.png&#8221; alt=&#8221;CHOOSE formula 2&#8243; title_text=&#8221;CHOOSE formula 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.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span>Does the behavior change when we exceed the number of choices (in this case 3)? As it turns out, not really.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/CHOOSE-formula-3.png&#8221; alt=&#8221;CHOOSE formula 3&#8243; title_text=&#8221;CHOOSE formula 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 _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span>Similar is the case when the index number is either a negative number.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/CHOOSE-formula-4.png&#8221; alt=&#8221;CHOOSE formula 4&#8243; title_text=&#8221;CHOOSE formula 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.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span>What happens if the index is a decimal number? Surprisingly, it doesn\u2019t error out this time. The CHOOSE formula\u00a0<\/span>considers the value on the left of the decimal point<span>\u00a0(in this case 2) and evaluates the formula accordingly.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/CHOOSE-formula-5.png&#8221; alt=&#8221;CHOOSE formula 5&#8243; title_text=&#8221;CHOOSE formula 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_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We may already be aware of the usability of the\u00a0nested IF\u00a0statements and\u00a0SWITCHformulas in Google Sheets. Going by the experience, we can conclude that the SWITCH formula is less complicated than that of the nested IF statement. On the similar lines, wouldn\u2019t it be nice if instead of specifying the case every time, we just\u00a0specify an [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":3517,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"We may already be aware of the usability of the <a href=\"https:\/\/www.sheetgo.com\/if-formula-google-sheets\/\">nested IF<\/a> statements and <a href=\"https:\/\/www.sheetgo.com\/switch-formula-google-sheets\/\">SWITCH<\/a> formulas in Google Sheets. Going by the experience, we can conclude that the SWITCH formula is less complicated than that of the nested IF statement. On the similar lines, wouldn't it be nice if instead of specifying the case every time, we just specify an index of sorts, and we get the corresponding value? Well, just to help us with that purpose, the Google Sheets application hosts the <a href=\"https:\/\/support.google.com\/docs\/answer\/3093371?hl=en\">CHOOSE<\/a> formula.\n<h3>Syntax<\/h3>\n<span style=\"font-family: courier new,courier,monospace; font-size: 14pt;\"><strong>CHOOSE(index, choice1, [choice2, ...])<\/strong><\/span>\n<ul>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>index<\/strong> <\/span>- this specifies the choice number. If it is 1, the CHOOSE formula returns the <span style=\"font-size: 12pt; font-family: courier new,courier,monospace;\"><strong>choice1<\/strong><\/span>. Similarly, if it is 3, we get <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>choice3<\/strong><\/span> in return. Please note that the Google Sheets allows up to 30 index values, starting from 1.<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>choice1<\/strong><\/span> - the formula returns this when the index value is 1. It can be a simple text, number, reference to another cell, or even a full-fledged formula.<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>choice2<\/strong> <\/span>- additional and optional parameters similar to that of <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>choice1<\/strong><\/span>.<\/li>\n<\/ul>\n<h3>Usage: CHOOSE Formula<\/h3>\nLet us start with the basic example that returns the weekday based on the index number. In the snapshot below, are can see the various combinations of the formula that we tried.\n\n<img class=\"aligncenter size-full wp-image-3367\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/choose1.png\" alt=\"CHOOSE Formula - Illustration 1\" width=\"978\" height=\"196\" \/>\n\nLike we mentioned above, the range of the index values can only start from 1 and can't exceed the total number of choices within the formula. What happens if we try to force that? It coughs up errors of course! Let's us try that firsthand. Below is the snapshot that demonstrates the outcome of using the index value 0.\n\n<img class=\"aligncenter size-full wp-image-3368\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/choose2.png\" alt=\"CHOOSE Formula - Illustration 2\" width=\"375\" height=\"183\" \/>\n\nDoes the behavior change when we exceed the number of choices (in this case 3)? As it turns out, not really.\n\n<img class=\"aligncenter size-full wp-image-3369\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/choose3.png\" alt=\"CHOOSE Formula - Illustration 3\" width=\"375\" height=\"183\" \/>\n\nSimilar is the case when the index number is either a negative number.\n\n<img class=\"aligncenter size-full wp-image-3370\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/choose4.png\" alt=\"CHOOSE Formula - Illustration 4\" width=\"376\" height=\"184\" \/>\n\nWhat happens if the index is a decimal number? Surprisingly, it doesn't error out this time. The CHOOSE formula considers the value on the left of the decimal point (in this case 2) and evaluates the formula accordingly.\n\n<img class=\"aligncenter size-full wp-image-3371\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/choose5.png\" alt=\"CHOOSE Formula - Illustration 5\" width=\"352\" height=\"119\" \/>\n\n\u00a0","_et_gb_content_width":"","footnotes":""},"categories":[54],"tags":[39,28],"class_list":["post-3365","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-sheets-formulas","tag-connections-t","tag-spreadsheets"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts\/3365","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=3365"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts\/3365\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/media\/3517"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/media?parent=3365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/categories?post=3365"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/tags?post=3365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}