Don't fully understand vlookup I guess

Waiting on OP

Why is this not working:

=if(VLOOKUP("Active",$C$82:$C$100,1)="Active",VLOOKUP(D11,$G$11:$I$68,3,FALSE),if(VLOOKUP("Inactive",$C$82:$C$100,1,FALSE)="Inactive",VLOOKUP(D11,$G$11:$I$68,2,FALSE)))

Error: Did not find value 'Active' in VLOOKUP evaluation.

I understand what I input like so:

=if(VLOOKUP("Active",$C$82:$C$100,1)="Active"

if it finds "Active" in $C$82:$C$100 I want it to do the following:

VLOOKUP(D11, $G$11;$I$68;3;FALSE)

if it doesn't find it I want it to:

VLOOKUP("Inactive", $C$82;$C$100;1;FALSE)="Inactive"

if it finds "Inactive" I want it to:

VLOOKUP(D11, $G$11:$I$68,2,FALSE)

Posted Mar 28, 2018, 8:32 PM UTC

14
Teslike•

The first vlookup is missing a zero at the end to indicate that you are looking for an exact match in column 1. It should be like this:

vlookup("Active",$C$82:$C$100,1,0)

instead of this:

vlookup("Active",$C$82:$C$100,1)

2
[deleted]•

[deleted]

2
CaptainLulOP•

Solution Verified

2
Clippy_Office_AsstMODpoints•

You have awarded 1 point to AndroidMasterZ

1
CaptainLulOP•

This worked! Nice :)

1
[deleted]•

[deleted]

1
JBob2508•

Sometimes data I formatted different, and causes issues? Make sure both columns are formatted the same, either text or auto.

Might there be a space somewhere?

If you're dealing with pasted data, maybe try manually typing the word into a cell?

Alternatively, try reworking the formula with =IFERROR()? though, with the use of absolute references, your data may likely be organized a bit unorthodox. Sometimes the answer isn't a different formula, it's different organization

E: that said, your formula looks right so good on ya there. Maybe another way to test is rather than use active in quotes, absolute reference a pre-existing usage of active in your target area

1
CaptainLulOP•

Uffff, thanks for the answer.

This is actually my first spreadsheet so I'm just trying to make the functions that I've discovered so far work in creative ways, thanks for the =IFERROR() function and the suggestion in edit; but I'll actually put this part of the sheet on hold for now, focus on something else, and then ask some of my friends that know how to sheet if they could help me with this issue. If we find the solution I'll let you know what worked in case you ever run into something similar :)

1
MacaroniNJesus2•

do you have a sample spreadsheet? i'll give it a shot.

1
CaptainLulOP•

Here you have the link to the google sheets, look at sheet "Builds" :)

Basically what I want to do is that you can kinda manually save builds that you allways use so that you can easily compare them with something new you come up with. But also so that you can experiment with the skills.

The function I had a problem with works now btw. But right now every time I'd want to "save" a build I'd have to change the function... and I bet there's a better solution to this.

1
MacaroniNJesus2•

I don't see a link. I am at work so I can look when I get home if you share a link

1
Clippy_Office_AsstMODpoints•

Read the comment thread for the solution here

=if(NOT(ISNA(VLOOKUP("Active",$C$82:$C$100,1,0))),VLOOKUP(D11,$G$11:$I$68,3,FALSE),if(ISNA(VLOOKUP("Inactive",$C$82:$C$100,1,FALSE)),,VLOOKUP(D11,$G$11:$I$68,2,FALSE)))
1
1649570172290•

=if(NOT(ISNA(VLOOKUP("Active",$C$82:$C$100,1,0))),VLOOKUP(D11,$G$11:$I$68,3,FALSE),if(ISNA(VLOOKUP("Inactive",$C$82:$C$100,1,FALSE)),,VLOOKUP(D11,$G$11:$I$68,2,FALSE)))

1