Pablo
Pablo

Reputation: 534

Send cell value as a parameter to use it as a value criteria for vlookup formula

I have the following as target:

Source workbook.

In another workbook, I have as a data source this table:

Source folder

So, using VLOOKUP formula I'm retrieving the values that I want for the cell just with formulas like that:

=CONSULTAV("user1";login.xlsx!Tabla1[#Datos];2;FALSO

CONSULTAV is the spanish formula for VLOOKUP, so I guess in english (just for better understanding as this is a english website) should be something like:

=VLOOKUP("user1";login.xlsx!Table1[#Data];2;FALSE

I want to type in the cell a simpler formula , something like:

=FindValue("user1")

So that formula calls the VLOOKUP formula and just uses the value as first argument for the VLOOKUP formula for searching the value.

Upvotes: 0

Views: 199

Answers (1)

user4039065
user4039065

Reputation:

Assuming the following data layout,

enter image description here

Select B3 and then create a defined name with the following parameters,

enter image description here

That formula is,

=VLOOKUP("password"&RIGHT(Sheet4!B2, 1), Table1[#All], 2, FALSE)

Now use =FindPassword in B3.

enter image description here

This method will always find the password associated with the user in the cell directly above it.

Upvotes: 0

Related Questions