ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VLOOKUP question (https://www.excelbanter.com/excel-discussion-misc-queries/118039-vlookup-question.html)

Jonah

VLOOKUP question
 
How do I lookup from column A and B so that the resultant answers are
put in columns D and E? I can do a single element Vlookup but not sure
about two columns of lookup.

I have Surname, Forename, Age, House name in my table.

If I key in a surname, I want the system to check for a single
occurrence of the forename to prevent duplicate names. It then must
give me the age of the person and also their house name.

e.g. Smith, Jimmy,23,The Gables

Jonah


Teethless mama

VLOOKUP question
 
Let's say your header in A1:D1
A1 =Surname
B1 =Forename
C1 =Age
D1 =House name

Criteria in
F1 =Smith
G1 =Jimmy

Searching for Age:
H1 =INDEX(C1:C100,MATCH(1,(A1:A100=F1)*(B1:B100=G1),0 ))
ctrlshiftenter (not just enter)

Searching for House name
I1 =INDEX(D1:D100,MATCH(1,(A1:A100=F1)*(B1:B100=G1),0 ))
ctrlshiftenter (not just enter)


"Jonah" wrote:

How do I lookup from column A and B so that the resultant answers are
put in columns D and E? I can do a single element Vlookup but not sure
about two columns of lookup.

I have Surname, Forename, Age, House name in my table.

If I key in a surname, I want the system to check for a single
occurrence of the forename to prevent duplicate names. It then must
give me the age of the person and also their house name.

e.g. Smith, Jimmy,23,The Gables

Jonah




All times are GMT +1. The time now is 05:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com