{"id":13150,"date":"2022-12-28T15:48:12","date_gmt":"2022-12-28T15:48:12","guid":{"rendered":"https:\/\/officetuts.net\/excel\/?p=13150"},"modified":"2024-02-19T14:52:17","modified_gmt":"2024-02-19T14:52:17","slug":"match-date-to-a-range-of-dates-and-times","status":"publish","type":"post","link":"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/","title":{"rendered":"Match Date to a Range of Dates and Times in Excel"},"content":{"rendered":"\n
Match-Date-to-a-Range-of-Dates-and-Times<\/a>Download File<\/a><\/div>\n\n\n\n

There are numerous tools at our disposal when it comes to extracting data. Excel is undoubtedly one of the best of them. If we want to manipulate the dates, we should look no further.<\/p>\n\n\n\n

In the example below, we will show how to find a certain date in a<\/strong> range of different dates and times<\/strong>.<\/p>\n\n\n\n

Match Date to a Range of Dates and Times<\/h2>\n\n\n\n

For our example, we will use the list of random dates and times<\/strong>, all in 2015<\/strong>, and different revenues<\/strong> that a company achieved for that date:<\/p>\n\n\n\n

\"Table\n\nDescription<\/figure>\n\n\n\n

The easiest way to find the revenue that we want is to use the VLOOKUP function<\/strong>. This function is usually used with numbers, but since dates in Excel are just numbers formatted differently, we can use it with ease to get desired results.<\/p>\n\n\n\n

Since we have a date and time together at our table, we must use VLOOKUP<\/strong> in a smart way.<\/p>\n\n\n\n

If we type in the date 3\/26\/2015<\/strong> in cell E2<\/strong> and input the VLOOKUP formula<\/strong><\/p>\n\n\n\n

=VLOOKUP(E2,A1:B14,2,0)<\/code><\/pre>\n\n\n\n

in cell E3<\/strong> to find this date in the table, we will be returned an error:<\/p>\n\n\n\n

\"Graphical<\/figure>\n\n\n\n

The reason for the error is the fact that we used 0<\/strong>, or FALSE<\/strong>, for range_lookup<\/strong>, which means we are searching for an exact match, and our date was formatted with a custom time, which will always be set to 00:00:00.<\/strong> To remove the error, we need to precise the time we search for, or we need to type in 1<\/strong>, or TRUE<\/strong>, for range_lookup value<\/strong>:<\/p>\n\n\n\n

=VLOOKUP(E2,A1:B14,2,1)<\/code><\/pre>\n\n\n\n
\"Graphical<\/figure>\n\n\n\n

Match Date to a Range of Dates and Times Formatted as Text<\/h2>\n\n\n\n

This happens often in Excel when, for some reason, we have our dates formatted as Text<\/strong>. This can happen, for example, when exporting from CSV<\/strong>. We will use the same numbers for our example, and will notice an error returned when using VLOOKUP<\/strong> from the previous example:<\/p>\n\n\n\n

\"Graphical<\/figure>\n\n\n\n

To resolve this issue, we need to convert our lookup_value<\/strong> (in our case, cell K2<\/strong>) to TEXT<\/strong>. This is the VLOOKUP function<\/strong> variation that we need to insert:<\/p>\n\n\n\n

=VLOOKUP(TEXT(K2,\"M\/D\/YYYY\")&\"*\",G1:H14,2,1)<\/code><\/pre>\n\n\n\n

This formula converts our lookup_value<\/strong> to text and it also omits all the values after that, by concatenating it with the asterisk<\/strong>. This is the result we get:<\/p>\n\n\n\n

\"\"<\/figure>\n","protected":false},"excerpt":{"rendered":"

There are numerous tools at our disposal when it comes to extracting data. Excel is undoubtedly one of the best of them. If…<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[170],"yoast_head":"\nMatch Date to a Range of Dates and Times in Excel<\/title>\n<meta name=\"description\" content=\"Learn how to match a certain date in a range of dates and times in Excel. Use VLOOKUP to find the desired result with ease.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Match Date to a Range of Dates and Times in Excel\" \/>\n<meta property=\"og:description\" content=\"Learn how to match a certain date in a range of dates and times in Excel. Use VLOOKUP to find the desired result with ease.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-28T15:48:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-19T14:52:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2022\/12\/table-description-automatically-generated-14.png\" \/>\n<meta name=\"author\" content=\"Harun Spahic\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Harun Spahic\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/\"},\"author\":{\"name\":\"Harun Spahic\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/694491c70f776081acdac4ae41f222a2\"},\"headline\":\"Match Date to a Range of Dates and Times in Excel\",\"datePublished\":\"2022-12-28T15:48:12+00:00\",\"dateModified\":\"2024-02-19T14:52:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/\"},\"wordCount\":377,\"publisher\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"image\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2022\/12\/table-description-automatically-generated-14.png\",\"keywords\":[\"file\"],\"articleSection\":[\"formulas\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/\",\"url\":\"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/\",\"name\":\"Match Date to a Range of Dates and Times in Excel\",\"isPartOf\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2022\/12\/table-description-automatically-generated-14.png\",\"datePublished\":\"2022-12-28T15:48:12+00:00\",\"dateModified\":\"2024-02-19T14:52:17+00:00\",\"description\":\"Learn how to match a certain date in a range of dates and times in Excel. Use VLOOKUP to find the desired result with ease.\",\"breadcrumb\":{\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/#primaryimage\",\"url\":\"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2022\/12\/table-description-automatically-generated-14.png\",\"contentUrl\":\"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2022\/12\/table-description-automatically-generated-14.png\",\"width\":268,\"height\":302,\"caption\":\"Table Description automatically generated\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/officetuts.net\/excel\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Match Date to a Range of Dates and Times in Excel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/officetuts.net\/excel\/#website\",\"url\":\"https:\/\/officetuts.net\/excel\/\",\"name\":\"\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/officetuts.net\/excel\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\",\"name\":\"Tomasz Decker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g\",\"caption\":\"Tomasz Decker\"},\"logo\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/\"},\"description\":\"Spreadsheet and Python enthusiast.\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/694491c70f776081acdac4ae41f222a2\",\"name\":\"Harun Spahic\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b7b887a2249679182be5550a4421a7a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b7b887a2249679182be5550a4421a7a9?s=96&d=mm&r=g\",\"caption\":\"Harun Spahic\"},\"sameAs\":[\"http:\/\/human.bsru.ac.th\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Match Date to a Range of Dates and Times in Excel","description":"Learn how to match a certain date in a range of dates and times in Excel. Use VLOOKUP to find the desired result with ease.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/","og_locale":"en_US","og_type":"article","og_title":"Match Date to a Range of Dates and Times in Excel","og_description":"Learn how to match a certain date in a range of dates and times in Excel. Use VLOOKUP to find the desired result with ease.","og_url":"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/","article_published_time":"2022-12-28T15:48:12+00:00","article_modified_time":"2024-02-19T14:52:17+00:00","og_image":[{"url":"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2022\/12\/table-description-automatically-generated-14.png"}],"author":"Harun Spahic","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Harun Spahic","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/#article","isPartOf":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/"},"author":{"name":"Harun Spahic","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/694491c70f776081acdac4ae41f222a2"},"headline":"Match Date to a Range of Dates and Times in Excel","datePublished":"2022-12-28T15:48:12+00:00","dateModified":"2024-02-19T14:52:17+00:00","mainEntityOfPage":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/"},"wordCount":377,"publisher":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"image":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/#primaryimage"},"thumbnailUrl":"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2022\/12\/table-description-automatically-generated-14.png","keywords":["file"],"articleSection":["formulas"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/","url":"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/","name":"Match Date to a Range of Dates and Times in Excel","isPartOf":{"@id":"https:\/\/officetuts.net\/excel\/#website"},"primaryImageOfPage":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/#primaryimage"},"image":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/#primaryimage"},"thumbnailUrl":"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2022\/12\/table-description-automatically-generated-14.png","datePublished":"2022-12-28T15:48:12+00:00","dateModified":"2024-02-19T14:52:17+00:00","description":"Learn how to match a certain date in a range of dates and times in Excel. Use VLOOKUP to find the desired result with ease.","breadcrumb":{"@id":"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/#primaryimage","url":"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2022\/12\/table-description-automatically-generated-14.png","contentUrl":"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2022\/12\/table-description-automatically-generated-14.png","width":268,"height":302,"caption":"Table Description automatically generated"},{"@type":"BreadcrumbList","@id":"https:\/\/officetuts.net\/excel\/formulas\/match-date-to-a-range-of-dates-and-times\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/officetuts.net\/excel\/"},{"@type":"ListItem","position":2,"name":"Match Date to a Range of Dates and Times in Excel"}]},{"@type":"WebSite","@id":"https:\/\/officetuts.net\/excel\/#website","url":"https:\/\/officetuts.net\/excel\/","name":"","description":"","publisher":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/officetuts.net\/excel\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42","name":"Tomasz Decker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g","caption":"Tomasz Decker"},"logo":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/"},"description":"Spreadsheet and Python enthusiast."},{"@type":"Person","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/694491c70f776081acdac4ae41f222a2","name":"Harun Spahic","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b7b887a2249679182be5550a4421a7a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b7b887a2249679182be5550a4421a7a9?s=96&d=mm&r=g","caption":"Harun Spahic"},"sameAs":["http:\/\/human.bsru.ac.th\/"]}]}},"_links":{"self":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/13150"}],"collection":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/comments?post=13150"}],"version-history":[{"count":3,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/13150\/revisions"}],"predecessor-version":[{"id":15527,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/13150\/revisions\/15527"}],"wp:attachment":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/media?parent=13150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/categories?post=13150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/tags?post=13150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}