{"id":3762,"date":"2016-07-19T19:27:15","date_gmt":"2016-07-19T17:27:15","guid":{"rendered":"https:\/\/www.myexcelonline.com\/?p=3762"},"modified":"2024-03-24T14:09:45","modified_gmt":"2024-03-24T13:09:45","slug":"randbetween-function-for-dates","status":"publish","type":"post","link":"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/randbetween-function-for-dates\/","title":{"rendered":"RANDBETWEEN Function for Excel Dates"},"content":{"rendered":"<p><em><strong>What does it do?<\/strong><\/em><\/p>\n<p>Generates random dates, in between a start date and an end date<\/p>\n<p><em><strong>Formula breakdown:<\/strong><\/em><\/p>\n<p>=RANDBETWEEN(<span style=\"color: #008000\"><span style=\"color: #0000ff\">bottom,<\/span> <span style=\"color: #ff0000\">top<\/span><\/span>)<\/p>\n<p><em><strong>What it means:<\/strong><\/em><\/p>\n<p>=RANDBETWEEN(<span style=\"color: #0000ff\">starting date for random date generation<\/span><span style=\"color: #008000\"><span style=\"color: #0000ff\">,<\/span> <span style=\"color: #ff0000\">end\u00a0date for random date generation<\/span><\/span><span style=\"color: #ff0000\">)<\/span><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<p>If you need to create a quick sample data set of <em>Dates<\/em>, the <a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/randbetween-function\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>RANDBETWEEN<\/strong> function<\/a> in Excel is very handy to use.<\/p>\n<p>All you need is to provide a start Date and an end Date. Then the function will immediately generate a random Date following that Date range you have provided.<\/p>\n<p>This is how it is done below (go to the bottom of the page if you want to see the animated gif tutorial):<br \/>\n<iframe src=\"https:\/\/www.youtube.com\/embed\/rvPQduDj1ig?rel=0 \" width=\"800\" height=\"400\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><span data-mce-type=\"bookmark\" style=\"width: 0px;overflow: hidden;line-height: 0\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><\/p>\n<p><a href=\"https:\/\/www.youtube.com\/c\/MyExcelOnlinecomtutorials?sub_confirmation=1\" target=\"_blank\" rel=\"noopener noreferrer nofollow\"><img loading=\"lazy\" decoding=\"async\" class=\"alignmiddle wp-image-111468 size-full\" style=\"vertical-align: middle\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/04\/1.yt_.png\" alt=\"\" title=\"\"><\/a><br \/>\n<a class=\"IRPP_minimalist icon-download\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/07\/Randbetween-Dates.xlsx\" target=\"_blank\"><span class=\"ctaText px-3 text-capitalize\">Download excel workbook<\/span><span class=\"postTitle px-3\">Randbetween-Dates.xlsx<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000\"><strong>STEP 1:<\/strong> <\/span>We need to <strong>enter the <a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/category\/formulas\/math\/randbetween\/\" target=\"_blank\" rel=\"noopener\">Randbetween\u00a0function<\/a><\/strong><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_57_1 counter-flat ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li><a href=\"#\" class=\"scroll-to-download\">Free Practice Workbook<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/randbetween-function-for-dates\/#RANDBETWEEN\" title=\"=RANDBETWEEN\">=RANDBETWEEN<\/a><\/li><\/ul><\/nav><\/div>\n<h2 style=\"text-align: center\"><span class=\"ez-toc-section\" id=\"RANDBETWEEN\"><\/span><span style=\"color: #0000ff\">=RANDBETWEEN<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000\"><strong>STEP 2:<\/strong><\/span>\u00a0The Randbetween\u00a0arguments:\u00a0Enter the<strong> Start Date (bottom)\u00a0<\/strong>and the<strong> End Date (top).<\/strong><\/p>\n<p>We need to use the <strong>DATE function\u00a0<\/strong>to create the Date inputs for the <strong>bottom<\/strong> and <strong>top<\/strong> Dates.<\/p>\n<p>In our example, we need\u00a0to <a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/random-date-generator\/\" target=\"_blank\" rel=\"noopener\">generate a random date<\/a> from <strong>January 1, 2016 (bottom)<\/strong> to <strong>December 31, 2016 (top)<\/strong>.<\/p>\n<h2 style=\"text-align: center\">=RANDBETWEEN<span style=\"color: #0000ff\">(DATE(2016,1,1), DATE(2016,12,31))<\/span><\/h2>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000\"><strong>STEP 3:<\/strong> <\/span>However notice that our random dates are in the numerical format:<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/07\/Randbetween-Date-01.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"RANDBETWEEN Function for Excel Dates\" class=\"size-full wp-image-3766 aligncenter\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/07\/Randbetween-Date-01.png\" alt=\"RANDBETWEEN Function for Excel Dates\" width=\"488\" height=\"223\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/07\/Randbetween-Date-01.png 488w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/07\/Randbetween-Date-01-300x137.png 300w\" sizes=\"(max-width: 488px) 100vw, 488px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Highlight the dates and change it into the <strong>Short Date Format<\/strong>:<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/07\/Randbetween-Date-02.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"RANDBETWEEN Function for Excel Dates\" class=\"size-full wp-image-3767 aligncenter\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/07\/Randbetween-Date-02.png\" alt=\"RANDBETWEEN Function for Excel Dates\" width=\"662\" height=\"511\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/07\/Randbetween-Date-02.png 662w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/07\/Randbetween-Date-02-300x232.png 300w\" sizes=\"(max-width: 662px) 100vw, 662px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Now we have our <strong>Random Dates<\/strong>:<br \/>\n<a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/07\/Randbetween-Date-03.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"RANDBETWEEN Function for Excel Dates\" class=\"size-full wp-image-3768 aligncenter\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/07\/Randbetween-Date-03.png\" alt=\"RANDBETWEEN Function for Excel Dates\" width=\"501\" height=\"138\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/07\/Randbetween-Date-03.png 501w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/07\/Randbetween-Date-03-300x83.png 300w\" sizes=\"(max-width: 501px) 100vw, 501px\" \/><\/a><\/p>\n<p><strong>NB:<\/strong> <em>Each time you make a change in a workbook that contains the RANDBETWEEN function,\u00a0the <a class=\"wpil_keyword_link\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/top-excel-formulas-function-examples-to-get-better-at-microsoft-excel\/\" target=\"_blank\" rel=\"noopener\" title=\"formulas\" data-wpil-keyword-link=\"linked\">formulas<\/a> will get updated and new values will appear! \u00a0This will also happen each time you press the F9 key..try it!<\/em><\/p>\n<p><em>To lock in the formulas, you will need to hard code the\u00a0formulas\u00a0by selecting the data, CTRL+C, Right Click and Paste As Values.<\/em><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What does it do? Generates random dates, in between a start date and an end date Formula breakdown: =RANDBETWEEN(bottom, top) What it means: =RANDBETWEEN(starting date for random date generation, end\u00a0date for random date generation) &nbsp; If you need to create a quick sample data set of Dates, the RANDBETWEEN function in Excel is very handy [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":17522,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cos_headline_score":0,"cos_seo_score":0,"cos_headline_text":"RANDBETWEEN Function for Excel Dates","cos_headline_has_been_analyzed":false,"cos_last_analyzed_headline":[],"om_disable_all_campaigns":false},"categories":[3,13,293],"tags":[142,149],"acf":[],"_links":{"self":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/3762"}],"collection":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/comments?post=3762"}],"version-history":[{"count":0,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/3762\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media\/17522"}],"wp:attachment":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media?parent=3762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/categories?post=3762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/tags?post=3762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}