{"id":4145,"date":"2020-12-18T10:40:02","date_gmt":"2020-12-18T09:40:02","guid":{"rendered":"https:\/\/www.sheetgo.com\/?p=4145"},"modified":"2025-06-23T20:17:52","modified_gmt":"2025-06-23T18:17:52","slug":"weekday-formula-google-sheets","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/es\/blog\/google-sheets-formulas\/weekday-formula-google-sheets\/","title":{"rendered":"C\u00f3mo utilizar la funci\u00f3n WEEKDAY en 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; da_disable_devices=&#8221;off|off|off&#8221; 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;][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>There will be instances where we may need to know the day of the week, for a given date. In Google Sheets, the <a href=\"https:\/\/support.google.com\/docs\/answer\/3092985?hl=en\" target=\"_blank\" rel=\"noopener noreferrer\">WEEKDAY<\/a> function can help us with this.<\/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<h2>Syntax<\/h2>\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;]=WEEKDAY(date, [type])[\/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><strong>date<\/strong> &#8211; is the input <g class=\"gr_ gr_45 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del\" id=\"45\" data-gr-id=\"45\">date<\/g> that the function takes into determining the day of the week. This can be a reference to a cell that holds a date value, or a formula that returns a date or even a number that the Google Sheets can evaluate to a date.<\/li>\n<li><strong>type<\/strong> &#8211; this is an optional indicator that lets the function know where to begin the week from. Valid values that we can key in for this parameter are 1, 2 and 3.\n<ul>\n<li>1 is the value by default. In this case, the week starts on Sunday and ends on Saturday. Therefore, <g class=\"gr_ gr_51 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins replaceWithoutSep\" id=\"51\" data-gr-id=\"51\">value<\/g> for Sunday is 1 and Saturday is 7.<\/li>\n<li>If we keyed in 2 for this parameter, the week begins on Monday and ends on Sunday. Hence, <g class=\"gr_ gr_46 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins replaceWithoutSep\" id=\"46\" data-gr-id=\"46\">value<\/g> for Monday is 1 and Sunday is\u00a07.<\/li>\n<li>Similarly, if this parameter is 3, the week begins on Monday and ends on Sunday. But the difference here is that the value for Monday is 0 and Sunday is 6.<\/li>\n<\/ul>\n<\/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<h2>How to use WEEKDAY function<\/h2>\n<p>I\u2019ll dive into a few examples to provide a better understanding of the function\u2019s working behaviour. Please consider the snapshot below.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/12\/Weekday-image-1-1.png&#8221; alt=&#8221;weekday-function-google-sheets-1&#8243; title_text=&#8221;weekday-function-google-sheets-1&#8243; 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>You will notice I have illustrated all types of WEEKDAY function types (as shown in column A). For the purpose of clarity, I indicated against each function type, the starting day, ending day and their corresponding WEEKDAY values in columns B and C.<\/p>\n<p>As per the given input type, and the day the input date evaluates to, the function accordingly returns the output (column D). The first three example cases are of type 1 and returned the values 7,4 and 6, which correspond to Saturday, Wednesday, and Friday respectively. The next three cases are of type 2 and returned 6, 3 and 5 for the same dates used in the first three cases. Similarly, the final three cases returned are of type 3. Therefore the results are 5, 2 and 4.<\/p>\n<h3>WEEKDAY out of range<\/h3>\n<p>What if you enter a different type other than that mentioned above? You can be sure to see an error, of course! I\u2019ll try that here.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/12\/Weekday-image-2-1.png&#8221; alt=&#8221;weekday-function-google-sheets-2&#8243; title_text=&#8221;weekday-function-google-sheets-2&#8243; 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>You can further extend the use of the WEEKDAY function by using the value it returns as the input to another function. For instance, here\u2019s an example of an employee who needs to wear a different colored uniform each day according to the data shown below.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/12\/Weekday-image-3-1.png&#8221; alt=&#8221;weekday-function-google-sheets-3&#8243; title_text=&#8221;weekday-function-google-sheets-3&#8243; 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<h3>WEEKDAY and VLOOKUP<\/h3>\n<p>The WEEKDAY function is used to determine the day of the week for a date, and then the VLOOKUP function is used to match the weekday with the corresponding uniform color. This is achieved with the formula <strong>=Vlookup(Weekday(Today(),2),A2:C8,3,False)<\/strong>.<\/p>\n<h3>WEEKDAY and CHOOSE<\/h3>\n<p>What if you want to generate the day of the week for a list of dates? There is a simple way to do that using the WEEKDAY function in combination with the CHOOSE function. In the example below, this is done by typing <strong>=Choose(Weekday(A6,1),&#8221;Sunday&#8221;,&#8221;Monday&#8221;,&#8221;Tuesday&#8221;,&#8221;Wednesday&#8221;,&#8221;Thursday&#8221;,&#8221;Friday&#8221;,&#8221;Saturday&#8221;)<\/strong>.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/12\/Weekday-image-4-1.png&#8221; alt=&#8221;weekday-function-google-sheets-4&#8243; title_text=&#8221;weekday-function-google-sheets-4&#8243; 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>Here, the WEEKDAY function is the input to the CHOOSE function, which takes the number generated by the WEEKDAY function and uses it to select the appropriate weekday choice.<\/p>\n<p>Make sure to get yourself known with the TODAY function as well in the following blog posts: <a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/today-formula-google-sheets\/\" target=\"_blank\" rel=\"noopener noreferrer\">How to use the TODAY function in Google Sheets <\/a>and <a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/weeknum-formula-google-sheets\/\" target=\"_blank\" rel=\"noopener\">How to use the WEEKNUM formula in Google Sheets.<\/a><\/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>There will be instances where we may need to know the day of the week, for a given date. In Google Sheets, the WEEKDAY function can help us with this.Syntax=WEEKDAY(date, [type]) date &#8211; is the input date that the function takes into determining the day of the week. This can be a reference to a [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":29528,"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 will be instances where we may need to know the day of the week, for a given date. In Google Sheets, the <a href=\"https:\/\/support.google.com\/docs\/answer\/3092985?hl=en\" target=\"_blank\" rel=\"noopener\">WEEKDAY<\/a> formula can help us with this.\n<h3>Syntax<\/h3>\n<span style=\"font-family: courier new,courier,monospace; font-size: 14pt;\"><strong>WEEKDAY(date, [type])<\/strong><\/span>\n<ul>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>date<\/strong><\/span> - is the input date that the formula takes into determining the day of the week. This can be a reference to a cell that holds a date value, or a formula that returns a date or even a number that the Google Sheets can evaluate to a date.<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>type<\/strong><\/span> - this is an optional indicator that lets the formula know where to begin the week from. Valid values that we can key in for this parameter are 1, 2 and 3.\n<ul>\n \t<li>1 is the value by default. In this case, the week starts on Sunday and ends on Saturday. Therefore, value for Sunday is 1 and Saturday is 7.<\/li>\n \t<li>If we keyed in 2 for this parameter, the week begins on Monday and ends on Sunday. Hence, value for Monday is 1 and Sunday is\u00a07.<\/li>\n \t<li>Similarly, if this parameter is 3, the week begins on Monday and ends on Sunday. But the difference here is that the value for Monday is 0 and Sunday is 6.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Usage: WEEKDAY Formula<\/h3>\nLet us dive into a few examples to get a better understanding of the formula's working behavior. Please consider the snapshot below.\n\n<img class=\"aligncenter size-full wp-image-4150\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/frame-generic-18.png\" alt=\"WEEKDAY Formula - Illustration 1\" width=\"795\" height=\"291\" \/>\n\nYou will notice we have illustrated all types of WEEKDAY formula types (as shown in column A). For the purposes of elucidation, we indicated against each formula type, the starting day, ending day and their corresponding WEEKDAY values in columns B and C.\n\nAs per the given input type, and the day the input date evaluates to, the formula accordingly returns the output (column D). The first three example cases are of type 1 and returned the values 7,4 and 6, which correspond to Saturday, Wednesday, and Friday respectively. The next three cases are of type 2 and returned 6, 3 and 5 for the same dates we used in the first three cases. Similarly, the final three cases returned are of type 3. Therefore the results are 5, 2 and 4 respectively.\n\nWhat if we enter a different type other than that mentioned above? We can be sure to see an error, of course! Let's try that, here.\n\n<img class=\"aligncenter size-full wp-image-4151\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/frame-generic-19.png\" alt=\"WEEKDAY Formula - Illustration 2\" width=\"451\" height=\"177\" \/>\n\nWe can further extend the use of the WEEKDAY formula by using the value it returns as parameter inputs in other formulas. For example, here's a use case, where an employee should wear a different colored uniform according to the tabular data shown below.\n\n<img class=\"aligncenter size-full wp-image-4152\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/frame-generic-20.png\" alt=\"WEEKDAY Formula - Illustration 3\" width=\"728\" height=\"243\" \/>\n\nSo, based on the weekday value, we got to know the uniform color by making use of the VLOOKUP formula.\n\n&nbsp;","_et_gb_content_width":"","footnotes":""},"categories":[54],"tags":[55,39,28],"class_list":["post-4145","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\/es\/wp-json\/wp\/v2\/posts\/4145","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/comments?post=4145"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/posts\/4145\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/media\/29528"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/media?parent=4145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/categories?post=4145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/tags?post=4145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}