Using CHOOSE Function along with VLOOKUP in Excel
Last Updated : 21 Aug, 2021
In Excel, managing space is a very important point to consider. Now, let's suppose you are in a situation where you want to compare multiple columns in the Excel dataset, and you want to derive results, This is not possible using the VLOOKUP function alone. So, to make a function capable of doing something like this, we will introduce a special function known as CHOOSE function. But, if you don't want to use CHOOSE function, then you have to use a helper column, making the job a little hectic.
So, in this article, we will see how to use VLOOKUP along with CHOOSE function.
First, we will see the syntax of CHOOSE FUNCTION in brief.
CHOOSE FUNCTION:
Syntax:
=CHOOSE(ARRAY DIMENSIONS(INDEX VALUE(S)),VALUE(1),VALUE(2),VALUE(3),.....)
Here,
- Here we will define array dimensions, ie how many columns should the array have.
- The next parameter(s) will define what value will go in the subsequent array columns, ie VALUE1 will get filled in the first column, and so on.
Example:
Here we will use this dataset. Let's suppose we have people in a sales firm, and they are evaluated for bonuses. Now, we want to know who did sales for BED SHEETS, by using VLOOKUP and CHOOSE function. So, first of all, let's see what the formula is, and then we will understand it part by part.
=VLOOKUP(B9,CHOOSE({1,2},C2:C6,A2:A6),2,TRUE)
Here the output will be as shown below:
Now, we will see part by part how this formula worked:
- B9: This is the targeted value to be compared by VLOOKUP to get the result, ie BED SHEETS.
- CHOOSE({1,2},C2:C6,A2:A6): This will create an array,having first column values from C2 TO C6,and second column values from A2 TO A6.
- 2: The value will be fetched from this column number.
- TRUE: This parameter is for enabling approximate search, ie any keyword found nearly matching with the required word will be given as a result.
- VLOOKUP(B9, CHOOSE({1,2}, C2:C6, A2:A6),1, TRUE): VLOOKUP will search for the desired keyword from the second column of the array, created by CHOOSE function.
Note: The formula above will use an array, so to execute it use Ctrl+Shift+Enter key combination.
The disadvantage of the above function is that VLOOKUP is not capable of doing a case-sensitive search, so to enhance VLOOKUP you have to make it case sensitive. For reference visit this article.
Similar Reads
Excel CHOOSE Function with Array We often use the CHOOSE function in Excel to pick something from a list. In this article, we'll see how to use CHOOSE with a bunch of things (we call it an array) to do various stuff in Excel. This array can be either many cells we put into the function or many things we get from the function. What
5 min read
How to use CHOOSE Function in Excel The CHOOSE function is technically part of Excelâs lookup function and can be incredibly useful. The CHOOSE function returns a value from a list using an index. One of those Excel features, CHOOSE, may not seem helpful alone, but when paired with other functions, it offers a ton of fantastic advanta
7 min read
Statistical Functions in Excel With Examples To begin with, statistical function in Excel let's first understand what is statistics and why we need it? So, statistics is a branch of sciences that can give a property to a sample. It deals with collecting, organizing, analyzing, and presenting the data. One of the great mathematicians Karl Pears
6 min read
OFFSET Function in Excel With Examples Excel contains many useful formulas and functions that make it more and more useful and at the same time user-friendly. Such a function is the OFFSET() function. In many cases, this function is also used inside another function. This function basically returns a reference of a single cell or a range
4 min read
Excel ROWS and COLUMNS Functions with Examples In Microsoft Excel, where precision and efficiency reign supreme, mastering the art of maneuvering through cells and worksheets is indispensable. Two indispensable components in your Excel toolbox are the ROW and COLUMN functions, each meticulously crafted to execute discrete functions that can subs
7 min read