SOLVED
Home

Help with either VLOOKUP or IF AND statements

%3CLINGO-SUB%20id%3D%22lingo-sub-335560%22%20slang%3D%22en-US%22%3EHelp%20with%20either%20VLOOKUP%20or%20IF%20AND%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-335560%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20large%20table%20(~3000%2B)%20rows%20where%20we%20have%20multiple%20samples%20and%20each%20row%20has%20a%20different%20information.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20goal%20in%20this%20is%20to%20create%20either%20a%20%3DIF%20AND%20statement%20or%20VLOOKUP%20statement%2C%20so%20that%20in%20another%20sheet%20all%20I%20have%20to%20do%20is%20enter%20the%20name%20Apple%20and%20it%20populates%20the%20columns%20with%20the%20data%20requested%20automatically%2C%20pulling%20from%20that%20large%20table%20of%20data.%26nbsp%3B%20I%20want%20to%20do%20this%20without%20manually%20copying%20and%20pasting%20%22transpose%22%20data.%20This%20way%2C%20I%20can%20continue%20to%20paste%20onto%20this%20large%20table%20as%20I%20get%20more%20data%2C%20and%20on%20the%20separate%20sheet%20it%20will%20populate%20the%20data%20and%20all%20I%20have%20to%20do%20is%20simply%20type%20in%20the%20unique%20sample%20name.%26nbsp%3B%20I%20have%20an%20example%20attached.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERight%20now%20I've%20tried%20both%20IF%2FAND%20and%20VLOOKUP%20statements%2C%20and%20every%20way%20I%20have%20tried%20it%20is%20not%20popping%20out%20the%20value%20once%20for%20the%20same%20row%20once%20both%20AND%20statements%20match.%26nbsp%3B%20Sometimes%20it%20pops%20out%20the%20value%20from%20a%20column%20where%20one%20AND%20statement%20matches%20but%20not%20the%20other.%26nbsp%3B%20It%20is%20hard%20to%20figure%20out.%26nbsp%3B%20I%20have%20an%20example%20of%20an%20equation%20on%20my%20sheet%20attached%2C%20but%20it%20is%20leading%20to%20%23N%2FA%20at%20the%20moment.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20anyone%20can%20help%20me%20it%20would%20be%20greatly%20appreciated!%26nbsp%3B%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-335560%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-338622%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20either%20VLOOKUP%20or%20IF%20AND%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-338622%22%20slang%3D%22en-US%22%3E%3CP%3EYou're%20welcome%2C%20Grant.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-338619%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20either%20VLOOKUP%20or%20IF%20AND%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-338619%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20are%20the%20absolute%20BEST!!!%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20must%20be%20the%20guru%20on%20here!%20Thank%20you%20so%20much%20for%20your%20help.%26nbsp%3B%20You%20will%20save%20me%20so%20much%20time%20in%20the%20future.%26nbsp%3B%20Thanks%20again%20Detlef!!%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-338616%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20either%20VLOOKUP%20or%20IF%20AND%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-338616%22%20slang%3D%22en-US%22%3E%3CP%3EI%20switched%20to%20an%20AGGREGATE()%20formula.%20See%20attached%20file.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-338543%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20either%20VLOOKUP%20or%20IF%20AND%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-338543%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20attached%20a%20file%20to%20describe%20what%20I%20previously%20posted%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-338539%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20either%20VLOOKUP%20or%20IF%20AND%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-338539%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Detlef%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20we%20are%20on%20the%20right%20path%20here.%26nbsp%3B%20The%20other%20thing%20is%20however%2C%20that%20for%20some%20samples%2C%20it%20does%20not%20follow%20the%20exact%20formula%20of%20%22Color%20-%20Taste%20-%20Smell%20-%20Appearance%20-%20Shape%22.%26nbsp%3B%20For%20instance%2C%20some%20of%20my%20sample%20names%20might%20just%20have%20%22Color%20-%20Taste%22%20or%20it%20might%20be%20out%20of%20order%20such%20as%20%22Taste%20-%20Color%20-%20Smell%22.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat's%20why%20I%20was%20trying%20to%20look%20up%20for%20two%20matching%20values%20in%20case%20they%20happen%20to%20be%20out%20of%20order.%26nbsp%3B%20I%20like%20the%20match%20function%20because%20that%20seems%20to%20be%20exactly%20what%20I'm%20looking%20for!%20However%20for%20the%20columns%20labeled%200-4%2C%20these%20values%20will%20get%20mixed%20up%20if%20the%20%22analysis%22%20deviates%20from%20what%20I%20showed.%26nbsp%3B%20I%20should%20have%20specified%20that%20in%20the%20original%20post!%20That%20is%20my%20bad.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-338270%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20either%20VLOOKUP%20or%20IF%20AND%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-338270%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENeither%20VLOOKUP()%20nor%20IF()%20but%20INDEX()%20and%20MATCH().%3C%2FP%3E%3CP%3ENote%3A%20To%20make%20the%20formula%20work%20you%20have%20to%20remove%20some%20trailing%20spaces.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
GrantB
New Contributor

Hello, 

 

I have a large table (~3000+) rows where we have multiple samples and each row has a different information. 

 

My goal in this is to create either a =IF AND statement or VLOOKUP statement, so that in another sheet all I have to do is enter the name Apple and it populates the columns with the data requested automatically, pulling from that large table of data.  I want to do this without manually copying and pasting "transpose" data. This way, I can continue to paste onto this large table as I get more data, and on the separate sheet it will populate the data and all I have to do is simply type in the unique sample name.  I have an example attached. 

 

Right now I've tried both IF/AND and VLOOKUP statements, and every way I have tried it is not popping out the value once for the same row once both AND statements match.  Sometimes it pops out the value from a column where one AND statement matches but not the other.  It is hard to figure out.  I have an example of an equation on my sheet attached, but it is leading to #N/A at the moment.

 

If anyone can help me it would be greatly appreciated! 

 

 

6 Replies

Hi

 

Neither VLOOKUP() nor IF() but INDEX() and MATCH().

Note: To make the formula work you have to remove some trailing spaces.

 

Hello Detlef, 

 

I think we are on the right path here.  The other thing is however, that for some samples, it does not follow the exact formula of "Color - Taste - Smell - Appearance - Shape".  For instance, some of my sample names might just have "Color - Taste" or it might be out of order such as "Taste - Color - Smell".  

 

That's why I was trying to look up for two matching values in case they happen to be out of order.  I like the match function because that seems to be exactly what I'm looking for! However for the columns labeled 0-4, these values will get mixed up if the "analysis" deviates from what I showed.  I should have specified that in the original post! That is my bad. 

 

 

I have attached a file to describe what I previously posted 

Solution

I switched to an AGGREGATE() formula. See attached file.

 

You are the absolute BEST!!! 

 

You must be the guru on here! Thank you so much for your help.  You will save me so much time in the future.  Thanks again Detlef!! 

You're welcome, Grant.