{"id":219642,"date":"2025-03-10T12:53:33","date_gmt":"2025-03-10T16:53:33","guid":{"rendered":"https:\/\/ibkrcampus.com\/campus\/?p=219642"},"modified":"2025-04-17T16:33:00","modified_gmt":"2025-04-17T20:33:00","slug":"excel-vlookup-with-a-vector-of-lookup-values","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/excel-vlookup-with-a-vector-of-lookup-values\/","title":{"rendered":"Excel: VLOOKUP with a Vector of Lookup Values"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><em>The article \u201cExcel: VLOOKUP with a Vector of Lookup Values\u201d was originally posted on <a href=\"https:\/\/shleeai.blogspot.com\/2021\/08\/excel-vlookup-with-vector-of-lookup.html\">SHLee AI Financial Model<\/a>.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This post presents an advanced Excel technique for the quadratic form matrix calculation accompanying cross products with correlation. This approach allows the user to change only input data and get the correct result without modifications of Excel formula.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Problem and Expected Output<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&nbsp;<img decoding=\"async\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/excel-vlookup-shlee-ai-1.jpg\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\">&nbsp;denotes the weighted sensitivities at maturities (<em>M<\/em>) in currencies (<em>C<\/em>).&nbsp;<strong>Our problem is to calculate<\/strong> <img decoding=\"async\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/excel-vlookup-shlee-ai-2.jpg\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\"> <strong>which is the aggregation of these<\/strong> <img decoding=\"async\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/excel-vlookup-shlee-ai-3.jpg\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\"><strong>across maturities within each currency<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"567\" height=\"94\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/excel-vlookup-shlee-ai-4.jpg\" alt=\"\" class=\"wp-image-219652 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/excel-vlookup-shlee-ai-4.jpg 567w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/excel-vlookup-shlee-ai-4-300x50.jpg 300w\" data-sizes=\"(max-width: 567px) 100vw, 567px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 567px; aspect-ratio: 567\/94;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here,&nbsp;<em>M<\/em>&nbsp;= {2w, 6w, &#8230;, 1Y, 2Y,&#8230;} and&nbsp;<em>C<\/em>&nbsp;= {USD, EUR, &#8230;}<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This equation can be rewritten as the following quadratic form.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"575\" height=\"119\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/excel-vlookup-shlee-ai-5.jpg\" alt=\"\" class=\"wp-image-219655 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/excel-vlookup-shlee-ai-5.jpg 575w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/excel-vlookup-shlee-ai-5-300x62.jpg 300w\" data-sizes=\"(max-width: 575px) 100vw, 575px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 575px; aspect-ratio: 575\/119;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here,&nbsp;<em>m<\/em>&nbsp;is the number of elements of&nbsp;<em>M<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In other words, we can calculate element-by-element cross products with correlation or quadratic form matrix multiplication.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before doing this job, we need to&nbsp;<strong>sort dataset by key columns<\/strong>&nbsp;such as currency code and maturity. Sorted input dataset and the expected output are as follows.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"732\" height=\"669\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/input_output-shlee-ai.png\" alt=\"\" class=\"wp-image-219657 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/input_output-shlee-ai.png 732w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/input_output-shlee-ai-700x640.png 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/input_output-shlee-ai-300x274.png 300w\" data-sizes=\"(max-width: 732px) 100vw, 732px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 732px; aspect-ratio: 732\/669;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As can be seen in the above Excel information, our purpose is to calculate&nbsp;<strong>K<\/strong>&nbsp;within each currency from input data using the aforementioned quadratic (or cross product type) form formula with correlation matrix <img decoding=\"async\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/excel-vlookup-shlee-ai-6.jpg\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\">. The following figure is the our proposed Excel formula in the case of&nbsp;<strong>EUR<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1100\" height=\"631\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/calculation-shlee-vlookup-excel-1100x631.png\" alt=\"\" class=\"wp-image-219659 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/calculation-shlee-vlookup-excel-1100x631.png 1100w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/calculation-shlee-vlookup-excel-700x401.png 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/calculation-shlee-vlookup-excel-300x172.png 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/calculation-shlee-vlookup-excel-768x440.png 768w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/calculation-shlee-vlookup-excel.png 1163w\" data-sizes=\"(max-width: 1100px) 100vw, 1100px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1100px; aspect-ratio: 1100\/631;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">These set of Excel formula are explained as the following order.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>get start and end row for each currency group<\/li>\n\n\n\n<li>add composite maturity column to correlation information<\/li>\n\n\n\n<li>calculate&nbsp;<img decoding=\"async\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/excel-vlookup-shlee-ai-8.jpg\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\">&nbsp;by each currency group<\/li>\n\n\n\n<li>collect non-empty cells for reporting<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Determination of Start and End Row by Currency<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For currency group operations, we split input data according to each currency. As such, we add two columns (sNo, eNo), which indicate relative number of start and end row for each currency from column name line (row = 2). Inserting and dragging two Excel formula generate sNo and eNo. For example, in the case of EUR, Excel formula for sNo and eNo have the following form.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\"7E\" &lt;- (ROW(B7)-ROW(B$2))*(B7&lt;>B6)\n \n\"7F\" &lt;- IFERROR(\n        IF(E7=0,0,\n              \n           SMALL($E7:$E$16, COUNTIF($E7:$E$16,\"=0\")+2)-1),\n              \n        E7-1+COUNT($E7:$E$16)\n      )<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-add-concatenated-maturity-to-correlation-table\">Add Concatenated Maturity to Correlation table<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To find the correct correlation between two maturities (Mat1, Mat2) by using VLOOKUP() function, we need to make two input maturities into one input. We, therefore, add&nbsp;<strong>Mat1_Mat2<\/strong>&nbsp;column which is the concatenation of Mat1 and Mat2 strings with underline(&#8220;_&#8221;) in between.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-calculation-of-nbsp-kc-nbsp-by-currency\">Calculation of&nbsp;Kc&nbsp;by Currency<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This calculation is the main content of this post. We perform the abovementioned quadratic form matrix calculation. It is worth noting that as&nbsp;the&nbsp;<strong>first input argument of VLOOKUP<\/strong>&nbsp;function, we use not one string but&nbsp;<strong>a vector of strings (composite maturity code; Mat1_Mat2)<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Calculation of&nbsp;<img decoding=\"async\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/excel-vlookup-shlee-ai-9.jpg\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\">&nbsp;by currency code can be easily done by&nbsp;<strong>one vector operation<\/strong>&nbsp;with&nbsp;<strong>CTRL+SHIFT+ENTER<\/strong>&nbsp;and dragging.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But unlike our normal expectation,&nbsp;<strong>applying this operation with CTRL+SHIFT+ENTER to one cell results in &#8220;#VALUE!&#8221;<\/strong>. I think Excel has some error for this type of operation. Because we can&#8217;t modify Excel itself, we sidestep this problem and&nbsp;<strong>apply this operation with CTRL+SHIFT+ENTER to any two cells<\/strong>&nbsp;not one cell.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As we are all expected, it is correct for this operation is applied into one cell with subsequent dragging because output is one value per one currency. But Excel requires at least two cells for this vector operation with&nbsp;<strong>CTRL+SHIFT+ENTER<\/strong>. For this reason, I also&nbsp;include &#8220;Dummy&#8221; column for two-cell operation. Of course, when we use two cells, correct answer is returned and we have only to read value from the first cell not Dummy cell.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In short,&nbsp;<strong>at Row 3 in Excel spreadsheet, our vector operation with CTRL+SHIFT+ENTER is applied to&nbsp;<strong>G3:H3<\/strong>&nbsp;(two cells) and apply this operation by dragging all rows.<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">=IF(B7=B6,\"\",SQRT(\nMMULT(MMULT(TRANSPOSE(OFFSET($D$2,E7,0,F7-E7+1)),\n \nVLOOKUP(OFFSET($C$2,E7,0,F7-E7+1)&amp;\"_\"&amp;TRANSPOSE(OFFSET($C$2,E7,0,F7-E7+1)),\n               $M$3:$P$27, 4, FALSE)),\n \nOFFSET($D$2,E7,0,F7-E7+1))))<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">At first,&nbsp;<strong>left row vector (LR)<\/strong>&nbsp;and&nbsp;<strong>right column vector (RC)<\/strong>&nbsp;are determined by using&nbsp;<strong>OFFSET()<\/strong>&nbsp;function with information of&nbsp;<strong>sRow<\/strong>&nbsp;and&nbsp;<strong>eRow<\/strong>&nbsp;for EUR.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">LR : TRANSPOSE(OFFSET($D$2,E7,0,F7-E7+1))\nRC :           OFFSET($D$2,E7,0,F7-E7+1)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">There is the correlation matrix&nbsp;<img decoding=\"async\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/excel-vlookup-shlee-ai-10.jpg\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\">&nbsp;between two vectors, which is constructed by using VLOOKUP() function. As a lookup value for VLOOKUP() function, string concatenation of two maturities with &#8220;_&#8221; are used and these maturities are also easily determined by using&nbsp;<strong>OFFSET()<\/strong>&nbsp;function with information of&nbsp;<strong>sRow<\/strong>&nbsp;and&nbsp;<strong>eRow<\/strong>&nbsp;for EUR.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">CORR(rho) : \n \nVLOOKUP(OFFSET($C$2,E7,0,F7-E7+1)&amp;\"_\"&amp;\n        TRANSPOSE(OFFSET($C$2,E7,0,F7-E7+1)),\n        $M$3:$P$27,4,FALSE)),<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A lookup value for VLOOKUP() function is known as one string or number. But as you can see from the above our Excel formula, a vector of lookup values are also used.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Collecting Non-empty Cells<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Collecting non-empty cells is done by the following Excel formula for the K4 cell (EUR).<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">=IFERROR(\n    INDEX($B$3:$G$16,\n      SMALL( ($G$3:$G$16&lt;>\"\")*(ROW($G$3:$G$16)-ROW($G$2)),\n              COUNTBLANK($G$3:$G$16)+ROW($G4)-ROW($G$2) ),\n      MATCH(K$2,$B$2:$G$2,0)\n    ),\"\")<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is already explained in the previous post.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/kiandlee.blogspot.com\/2021\/08\/excel-calculation-by-group-and.html\" target=\"_blank\" rel=\"noreferrer noopener\">Excel : Calculation by group and collecting non-empty cells<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Benefit of This Excel Technique<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Although input data is changed, we can get the correct results without any modification of Excel formula. This point is a merit of our approach. As Troy Olson said that if a picture is worth a thousand words, then a video is worth a million, Let&#8217;s see the following.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Changes of Input and the corresponding results<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Visit <a href=\"https:\/\/shleeai.blogspot.com\/2021\/08\/excel-vlookup-with-vector-of-lookup.html\">SHLee AI Financial Model<\/a> blog to watch the video on creating a VLOOKUP macro<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This advanced Excel technique will help reduce annoying jobs when input data is changed regularly or irregularly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post presents an advanced Excel technique for the quadratic form matrix calculation accompanying cross products with correlation. <\/p>\n","protected":false},"author":662,"featured_media":134181,"comment_status":"open","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[339,338,341],"tags":[806,1006],"contributors-categories":[13728],"class_list":["post-219642","post","type-post","status-publish","format-standard","has-post-thumbnail","category-data-science","category-ibkr-quant-news","category-quant-development","tag-data-science","tag-fintech","contributors-categories-sh-fintech-modeling"],"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Excel: VLOOKUP with a Vector of Lookup Values | IBKR Quant<\/title>\n<meta name=\"description\" content=\"This post presents an advanced Excel technique for the quadratic form matrix calculation accompanying cross products with correlation.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/219642\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Excel: VLOOKUP with a Vector of Lookup Values\" \/>\n<meta property=\"og:description\" content=\"This post presents an advanced Excel technique for the quadratic form matrix calculation accompanying cross products with correlation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/excel-vlookup-with-a-vector-of-lookup-values\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-10T16:53:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-17T20:33:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/quant-blue-digit-abstract.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"563\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Sang-Heon Lee\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sang-Heon Lee\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/excel-vlookup-with-a-vector-of-lookup-values\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/excel-vlookup-with-a-vector-of-lookup-values\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Sang-Heon Lee\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/0a959ff9de7f0465a07baa1fe1ae0200\"\n\t            },\n\t            \"headline\": \"Excel: VLOOKUP with a Vector of Lookup Values\",\n\t            \"datePublished\": \"2025-03-10T16:53:33+00:00\",\n\t            \"dateModified\": \"2025-04-17T20:33:00+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/excel-vlookup-with-a-vector-of-lookup-values\\\/\"\n\t            },\n\t            \"wordCount\": 896,\n\t            \"commentCount\": 0,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/excel-vlookup-with-a-vector-of-lookup-values\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/quant-blue-digit-abstract.png\",\n\t            \"keywords\": [\n\t                \"Data Science\",\n\t                \"fintech\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Quant\",\n\t                \"Quant Development\"\n\t            ],\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"CommentAction\",\n\t                    \"name\": \"Comment\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/excel-vlookup-with-a-vector-of-lookup-values\\\/#respond\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/excel-vlookup-with-a-vector-of-lookup-values\\\/\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/excel-vlookup-with-a-vector-of-lookup-values\\\/\",\n\t            \"name\": \"Excel: VLOOKUP with a Vector of Lookup Values | IBKR Campus US\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/excel-vlookup-with-a-vector-of-lookup-values\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/excel-vlookup-with-a-vector-of-lookup-values\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/quant-blue-digit-abstract.png\",\n\t            \"datePublished\": \"2025-03-10T16:53:33+00:00\",\n\t            \"dateModified\": \"2025-04-17T20:33:00+00:00\",\n\t            \"description\": \"This post presents an advanced Excel technique for the quadratic form matrix calculation accompanying cross products with correlation.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/excel-vlookup-with-a-vector-of-lookup-values\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/excel-vlookup-with-a-vector-of-lookup-values\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/quant-blue-digit-abstract.png\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/quant-blue-digit-abstract.png\",\n\t            \"width\": 1000,\n\t            \"height\": 563,\n\t            \"caption\": \"Quant\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/0a959ff9de7f0465a07baa1fe1ae0200\",\n\t            \"name\": \"Sang-Heon Lee\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/sang-heonlee\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Excel: VLOOKUP with a Vector of Lookup Values | IBKR Quant","description":"This post presents an advanced Excel technique for the quadratic form matrix calculation accompanying cross products with correlation.","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:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/219642\/","og_locale":"en_US","og_type":"article","og_title":"Excel: VLOOKUP with a Vector of Lookup Values","og_description":"This post presents an advanced Excel technique for the quadratic form matrix calculation accompanying cross products with correlation.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/excel-vlookup-with-a-vector-of-lookup-values\/","og_site_name":"IBKR Campus US","article_published_time":"2025-03-10T16:53:33+00:00","article_modified_time":"2025-04-17T20:33:00+00:00","og_image":[{"width":1000,"height":563,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/quant-blue-digit-abstract.png","type":"image\/png"}],"author":"Sang-Heon Lee","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sang-Heon Lee","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/excel-vlookup-with-a-vector-of-lookup-values\/#article","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/excel-vlookup-with-a-vector-of-lookup-values\/"},"author":{"name":"Sang-Heon Lee","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/0a959ff9de7f0465a07baa1fe1ae0200"},"headline":"Excel: VLOOKUP with a Vector of Lookup Values","datePublished":"2025-03-10T16:53:33+00:00","dateModified":"2025-04-17T20:33:00+00:00","mainEntityOfPage":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/excel-vlookup-with-a-vector-of-lookup-values\/"},"wordCount":896,"commentCount":0,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/excel-vlookup-with-a-vector-of-lookup-values\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/quant-blue-digit-abstract.png","keywords":["Data Science","fintech"],"articleSection":["Data Science","Quant","Quant Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/excel-vlookup-with-a-vector-of-lookup-values\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/excel-vlookup-with-a-vector-of-lookup-values\/","url":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/excel-vlookup-with-a-vector-of-lookup-values\/","name":"Excel: VLOOKUP with a Vector of Lookup Values | IBKR Campus US","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/excel-vlookup-with-a-vector-of-lookup-values\/#primaryimage"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/excel-vlookup-with-a-vector-of-lookup-values\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/quant-blue-digit-abstract.png","datePublished":"2025-03-10T16:53:33+00:00","dateModified":"2025-04-17T20:33:00+00:00","description":"This post presents an advanced Excel technique for the quadratic form matrix calculation accompanying cross products with correlation.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/excel-vlookup-with-a-vector-of-lookup-values\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/excel-vlookup-with-a-vector-of-lookup-values\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/quant-blue-digit-abstract.png","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/quant-blue-digit-abstract.png","width":1000,"height":563,"caption":"Quant"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/0a959ff9de7f0465a07baa1fe1ae0200","name":"Sang-Heon Lee","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/sang-heonlee\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/quant-blue-digit-abstract.png","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/219642","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/662"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=219642"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/219642\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/134181"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=219642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=219642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=219642"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=219642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}