{"id":63,"date":"2026-02-24T08:40:09","date_gmt":"2026-02-24T08:40:09","guid":{"rendered":"https:\/\/gigz.pk\/excel\/?post_type=lesson&#038;p=63"},"modified":"2026-03-08T07:24:26","modified_gmt":"2026-03-08T07:24:26","slug":"xlookup","status":"publish","type":"lesson","link":"https:\/\/gigz.pk\/excel\/lesson\/xlookup\/","title":{"rendered":"XLOOKUP"},"content":{"rendered":"\n<p>The <strong>XLOOKUP<\/strong> function is an advanced lookup function that replaces <strong>VLOOKUP<\/strong> and <strong>HLOOKUP<\/strong>. It allows you to search in any direction (left, right, up, or down) and returns exact matches by default.<\/p>\n\n\n\n<p>It is more flexible, powerful, and easier to use.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Structure of XLOOKUP<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Arguments:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>lookup_value<\/strong> \u2192 Value you want to find<\/li>\n\n\n\n<li><strong>lookup_array<\/strong> \u2192 Range where Excel searches<\/li>\n\n\n\n<li><strong>return_array<\/strong> \u2192 Range to return result from<\/li>\n\n\n\n<li><strong>if_not_found<\/strong> \u2192 Optional custom message<\/li>\n\n\n\n<li><strong>match_mode<\/strong> \u2192 Exact or approximate match<\/li>\n\n\n\n<li><strong>search_mode<\/strong> \u2192 Search direction<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Example 1: Basic XLOOKUP<\/h2>\n\n\n\n<p>If:<\/p>\n\n\n\n<p>A2 = Employee ID<br>A5:A10 = Employee IDs<br>B5:B10 = Employee Names<\/p>\n\n\n\n<p>Formula:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">=XLOOKUP(A2, A5:A10, B5:B10)<\/pre>\n\n\n\n<p>This searches ID and returns the matching name.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example 2: With Custom Message<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">=XLOOKUP(A2, A5:A10, B5:B10, \"Not Found\")<\/pre>\n\n\n\n<p>No need for IFERROR.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example 3: Lookup to the Left<\/h2>\n\n\n\n<p>Unlike VLOOKUP, XLOOKUP can look left.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">=XLOOKUP(A2, B5:B10, A5:A10)<\/pre>\n\n\n\n<p>This searches in column B and returns value from column A.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Match Modes<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Match Mode<\/th><th>Meaning<\/th><\/tr><\/thead><tbody><tr><td>0<\/td><td>Exact match (default)<\/td><\/tr><tr><td>-1<\/td><td>Exact or next smaller<\/td><\/tr><tr><td>1<\/td><td>Exact or next larger<\/td><\/tr><tr><td>2<\/td><td>Wildcard match<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">=XLOOKUP(A2, A5:A10, B5:B10, , 1)<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Search Modes<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Search Mode<\/th><th>Meaning<\/th><\/tr><\/thead><tbody><tr><td>1<\/td><td>First to last (default)<\/td><\/tr><tr><td>-1<\/td><td>Last to first<\/td><\/tr><tr><td>2<\/td><td>Binary search ascending<\/td><\/tr><tr><td>-2<\/td><td>Binary search descending<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Advantages of XLOOKUP<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Searches in any direction<\/li>\n\n\n\n<li>Exact match by default<\/li>\n\n\n\n<li>No column index number required<\/li>\n\n\n\n<li>Handles errors inside formula<\/li>\n\n\n\n<li>Works vertically and horizontally<\/li>\n\n\n\n<li>Can return multiple columns<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Example: Return Multiple Columns<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">=XLOOKUP(A2, A5:A10, B5:D10)<\/pre>\n\n\n\n<p>Returns multiple related values at once.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why XLOOKUP is Important<\/h2>\n\n\n\n<p>It simplifies complex lookup tasks and is the modern replacement for older lookup functions.<\/p>\n\n\n\n<p>XLOOKUP is recommended for new Excel users because it is powerful, flexible, and easy to use.<\/p>\n\n\n<div class=\"yoast-breadcrumbs\"><span><span><a href=\"https:\/\/gigz.pk\/excel\/\">Home<\/a><\/span> \u00bb <span class=\"breadcrumb_last\" aria-current=\"page\">Excel Essential Functions (EEF) > Lookup &#038; Reference > XLOOKUP<\/span><\/span><\/div>\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1772954757967\"><strong class=\"schema-faq-question\"><\/strong> <p class=\"schema-faq-answer\"><\/p> <\/div> <\/div>\n","protected":false},"menu_order":33,"template":"","class_list":["post-63","lesson","type-lesson","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>XLOOKUP - Learn Excel the Right Way.<\/title>\n<meta name=\"description\" content=\"Learn how to use the XLOOKUP function in Excel to search data in any direction and replace VLOOKUP with a faster, flexible formula.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gigz.pk\/excel\/lesson\/xlookup\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"XLOOKUP - Learn Excel the Right Way.\" \/>\n<meta property=\"og:description\" content=\"Learn how to use the XLOOKUP function in Excel to search data in any direction and replace VLOOKUP with a faster, flexible formula.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gigz.pk\/excel\/lesson\/xlookup\/\" \/>\n<meta property=\"og:site_name\" content=\"Learn Excel the Right Way.\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-08T07:24:26+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/lesson\\\/xlookup\\\/\",\"url\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/lesson\\\/xlookup\\\/\",\"name\":\"XLOOKUP - Learn Excel the Right Way.\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/#website\"},\"datePublished\":\"2026-02-24T08:40:09+00:00\",\"dateModified\":\"2026-03-08T07:24:26+00:00\",\"description\":\"Learn how to use the XLOOKUP function in Excel to search data in any direction and replace VLOOKUP with a faster, flexible formula.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/lesson\\\/xlookup\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gigz.pk\\\/excel\\\/lesson\\\/xlookup\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/lesson\\\/xlookup\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Excel Essential Functions (EEF) > Lookup & Reference > XLOOKUP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/#website\",\"url\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/\",\"name\":\"Learn Excel the Right Way.\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"XLOOKUP - Learn Excel the Right Way.","description":"Learn how to use the XLOOKUP function in Excel to search data in any direction and replace VLOOKUP with a faster, flexible formula.","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:\/\/gigz.pk\/excel\/lesson\/xlookup\/","og_locale":"en_US","og_type":"article","og_title":"XLOOKUP - Learn Excel the Right Way.","og_description":"Learn how to use the XLOOKUP function in Excel to search data in any direction and replace VLOOKUP with a faster, flexible formula.","og_url":"https:\/\/gigz.pk\/excel\/lesson\/xlookup\/","og_site_name":"Learn Excel the Right Way.","article_modified_time":"2026-03-08T07:24:26+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["WebPage","FAQPage"],"@id":"https:\/\/gigz.pk\/excel\/lesson\/xlookup\/","url":"https:\/\/gigz.pk\/excel\/lesson\/xlookup\/","name":"XLOOKUP - Learn Excel the Right Way.","isPartOf":{"@id":"https:\/\/gigz.pk\/excel\/#website"},"datePublished":"2026-02-24T08:40:09+00:00","dateModified":"2026-03-08T07:24:26+00:00","description":"Learn how to use the XLOOKUP function in Excel to search data in any direction and replace VLOOKUP with a faster, flexible formula.","breadcrumb":{"@id":"https:\/\/gigz.pk\/excel\/lesson\/xlookup\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gigz.pk\/excel\/lesson\/xlookup\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/gigz.pk\/excel\/lesson\/xlookup\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gigz.pk\/excel\/"},{"@type":"ListItem","position":2,"name":"Excel Essential Functions (EEF) > Lookup & Reference > XLOOKUP"}]},{"@type":"WebSite","@id":"https:\/\/gigz.pk\/excel\/#website","url":"https:\/\/gigz.pk\/excel\/","name":"Learn Excel the Right Way.","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gigz.pk\/excel\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/gigz.pk\/excel\/wp-json\/wp\/v2\/lesson\/63","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gigz.pk\/excel\/wp-json\/wp\/v2\/lesson"}],"about":[{"href":"https:\/\/gigz.pk\/excel\/wp-json\/wp\/v2\/types\/lesson"}],"wp:attachment":[{"href":"https:\/\/gigz.pk\/excel\/wp-json\/wp\/v2\/media?parent=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}