VLOOKUP

%3CLINGO-SUB%20id%3D%22lingo-sub-1533900%22%20slang%3D%22en-US%22%3EVLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1533900%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20formula%20VLOOKUP%20consists%20on%20this%3A%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3DVLOOKUP(lookup%20value%2C%20range%20containing%20the%20lookup%20value%2C%20the%20column%20number%20in%20the%20range%20containing%20the%20return%20value%2C%20Approximate%20match%20(TRUE)%20or%20Exact%20match%20(FALSE)).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESyntax%3CBR%20%2F%3EVLOOKUP%20(lookup_value%2C%20table_array%2C%20col_index_num%2C%20%5Brange_lookup%5D)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%2C%20please%20take%20a%20look%20at%20the%20image%20that%20i%20am%20attaching%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20native%20language%20is%20spanish%2C%20so%20the%20proyect%20i%20am%20building%20is%20in%20spanish%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20if%20you%20take%20a%20look%20at%20the%20image%20i%20attached%2C%20you%20can%20see%20that%20the%20cell%20that's%20selected%20is%20AV27%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20it%20says%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DSI(H27%3D%22%22%2CBUSCARV(I27%2C%24AK%2426%3A%24AR%2446%2C8%2CFALSO)%2C%22%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhich%20in%20English%20would%20be%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF(H27%3D%22%22%2CVLOOKUP(I27%2C%24AK%2426%3A%24AR%2446%2C8%2CFALSE)%2C%22%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere's%20no%20need%20for%20you%20to%20know%20what%20columns%20H%20and%20I%20have.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20you%20can%20see%20in%20the%20image%3C%2FP%3E%3CP%3E%24AK%2426%3A%24AR%2446%20is%20what%20i%20called%20%22TABLA%203%22%2C%20which%20would%20be%20%22TABLE%203%22%20in%20English%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20as%20you%20can%20see%2C%20the%20%22TABLE%203%22%20is%20in%20fact%203%20different%20mini%20tables%2C%3C%2FP%3E%3CP%3ETable%201%20-%20AK%3AAM%3CBR%20%2F%3ETable%202%20-%20AO%3AAP%3CBR%20%2F%3ETable%203%20-%20AR%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20in%20my%20formula%20of%20AV27%2C%20i%20treated%20those%203%20tables%2C%20as%20a%20single%20table.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFortunately%2C%20the%20formula%20functioned%20fine.%20I%20treated%20those%203%20mini%20tables%20as%20a%20single%20table%20of%208%20columns%2C%20and%20even%20though%20I%20did%20that%2C%20and%20even%20though%20there%20are%20empty%20columns%2C%20such%20as%20AN%20and%20AQ%2C%20the%20formula%20functions%20perfectly%20fine.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20question%20is%3A%3C%2FP%3E%3CP%3ECan%20I%20use%20a%20VLOOKUP%20formula%20where%20my%20second%20argument%20is%203%20different%20mini%20tables%20which%20i%20am%20treating%20as%20a%20single%20table%3F%20Can%20the%20formula%20still%20work%20fine%3F%20Can%20i%20rest%20in%20peace%20that%20nothing%20will%20go%20wrong%3F%20Is%20that%20theorically%20valid%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1533900%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1533919%22%20slang%3D%22en-US%22%3ERe%3A%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1533919%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F726406%22%20target%3D%22_blank%22%3E%40Miguel_Zafiro%3C%2FA%3E%2C%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20want%20vlookup%20to%20search%20through%203%20different%20table%20I'd%20use%20something%20like%20this...%3C%2FP%3E%3CP%3E%3Difna(vlookup(value%2Ctable1%2Ccolumn%20index)%2Cifna(vlookup(value%2Ctable2%2Ccolumn%20index)%2C%20vlookup(value%2Ctable3%2Ccolumn%20index)))%3C%2FP%3E%3CP%3ESee%20attached%20screenshot%20for%20example.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1533992%22%20slang%3D%22en-US%22%3ERe%3A%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1533992%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F726406%22%20target%3D%22_blank%22%3E%40Miguel_Zafiro%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20asked%3A%20Can%20I%20use%20a%20VLOOKUP%20formula%20where%20my%20second%20argument%20is%203%20different%20mini%20tables%20which%20i%20am%20treating%20as%20a%20single%20table%3F%20Can%20the%20formula%20still%20work%20fine%3F%20Can%20i%20rest%20in%20peace%20that%20nothing%20will%20go%20wrong%3F%20Is%20that%20theorically%20valid%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20which%20I'd%20reply%20that%20in%20the%20example%20you%20give%20(the%20image%20file)%20%3CSTRONG%3E%3CEM%3E%3CU%3Eit%20really%20is%20only%20one%20table%3C%2FU%3E%3C%2FEM%3E%3C%2FSTRONG%3E.%20The%20fact%20that%20you%20conceptually%20think%20of%20it%20as%20three%20doesn't%20change%20the%20fact%20that%20it%20is%20a%20single%20set%20of%20columns%20and%20rows%20with%20the%20first%20column%20serving%20as%20the%20basis%20for%20using%20VLOOKUP%20with%20offsets%20going%20to%20any%20of%20the%20columns.%20You%20may%20conceive%20of%20them%20as%20separate%20mini-tables%2C%20but%20they're%20not%20seen%20that%20way%20by%20Excel.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%2C%20that%20said%2C%20I%20will%20point%20out%20that%20a%20true%20Excel%20Table%20would%20%3CSTRONG%3E%3CEM%3Enot%3C%2FEM%3E%20%3C%2FSTRONG%3Ehave%20the%20blank%20rows%20you've%20incorporated%2C%20perhaps%20as%20a%20way%20to%20create%20mini-tables%2C%20or%20mini-subsets%2C%20in%20the%20vertical%20dimension.%20A%20true%2C%20and%20most%20error-free%2C%20Excel%20Table%20would%20be%20continuous%20rows%20of%20data%2C%20with%20no%20blank%20rows.%20You%20can%20have%20blank%20cells%20(if%20no%20data%20is%20available%20or%20some%20such)%20for%20any%20given%20row%20and%20column%20intersection.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you're%20trying%20to%20differentiate%20between%20different%20entities%20by%20leaving%20blank%20rows%2C%20I'd%20suggest%20adding%20a%20column%20to%20take%20care%20of%20that%20differentiation.%20When%20it%20comes%20time%20to%20summarize%20through%20Pivot%20Tables%2C%20etc.%2C%20you'll%20have%20a%20lot%20easier%20time.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

The formula VLOOKUP consists on this:


=VLOOKUP(lookup value, range containing the lookup value, the column number in the range containing the return value, Approximate match (TRUE) or Exact match (FALSE)).

 

Syntax
VLOOKUP (lookup_value, table_array, col_index_num, [range_lookup])

 

Now, please take a look at the image that i am attaching

 

My native language is spanish, so the proyect i am building is in spanish

 

But if you take a look at the image i attached, you can see that the cell that's selected is AV27

 

And it says:

 

=SI(H27="",BUSCARV(I27,$AK$26:$AR$46,8,FALSO),"")

 

Which in English would be:

 

=IF(H27="",VLOOKUP(I27,$AK$26:$AR$46,8,FALSE),"")

 

There's no need for you to know what columns H and I have.

 

As you can see in the image

$AK$26:$AR$46 is what i called "TABLA 3", which would be "TABLE 3" in English

 

But as you can see, the "TABLE 3" is in fact 3 different mini tables,

Table 1 - AK:AM
Table 2 - AO:AP
Table 3 - AR

 

But in my formula of AV27, i treated those 3 tables, as a single table.

 

Fortunately, the formula functioned fine. I treated those 3 mini tables as a single table of 8 columns, and even though I did that, and even though there are empty columns, such as AN and AQ, the formula functions perfectly fine.

 

My question is:

Can I use a VLOOKUP formula where my second argument is 3 different mini tables which i am treating as a single table? Can the formula still work fine? Can i rest in peace that nothing will go wrong? Is that theorically valid?

 

 

2 Replies
Highlighted

Hi @Miguel_Zafiro

If you want vlookup to search through 3 different table I'd use something like this...

=ifna(vlookup(value,table1,column index),ifna(vlookup(value,table2,column index), vlookup(value,table3,column index)))

See attached screenshot for example.

 

Highlighted

@Miguel_Zafiro 

 

You asked: Can I use a VLOOKUP formula where my second argument is 3 different mini tables which i am treating as a single table? Can the formula still work fine? Can i rest in peace that nothing will go wrong? Is that theorically valid?

 

To which I'd reply that in the example you give (the image file) it really is only one table. The fact that you conceptually think of it as three doesn't change the fact that it is a single set of columns and rows with the first column serving as the basis for using VLOOKUP with offsets going to any of the columns. You may conceive of them as separate mini-tables, but they're not seen that way by Excel.

 

Now, that said, I will point out that a true Excel Table would not have the blank rows you've incorporated, perhaps as a way to create mini-tables, or mini-subsets, in the vertical dimension. A true, and most error-free, Excel Table would be continuous rows of data, with no blank rows. You can have blank cells (if no data is available or some such) for any given row and column intersection.

 

If you're trying to differentiate between different entities by leaving blank rows, I'd suggest adding a column to take care of that differentiation. When it comes time to summarize through Pivot Tables, etc., you'll have a lot easier time.