Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use V or HLOOKUP to return multiple values

Status
Not open for further replies.

KristieLee1

Technical User
Jul 13, 2009
76
0
0
US
I have two tables, one(1:1 relationship)contains a unique Id and an amount, the other contains the unique id and several records per each ID (1:many relationship). I need to return several different column values to the 1:1 table from the 1:many table.

Is there a way to return multiple cell values or am I limited to just one?

Example, vorhlookup(B3,manytable,2,3,4,false). What I'm trying to say here is if B3 exists in manytable, return the values in columns 2,3,and 4. Can't figure out how to tell it to return those values in specific columns, but hey...its a start.

As usual, thanks in advance and any help is appreciated.
 


Hi,

I thought I was following you, until your statement, "return the values in columns 2,3,and 4." On the face of it, that does not define a 1:many relationship, unless your manytable table is not normalized.

In order to clarify the issue, please post an example of data in both tables that are related in the manner you have described.



Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
If there is only one occurence of your unique ID in your manytable then there should be no issue with returning values from columns 2 3 and 4.
If you want them individually you would have to write 3 different formulas:
Code:
=VLOOKUP(B3,manytable,2,FALSE)
=VLOOKUP(B3,manytable,3,FALSE)
=VLOOKUP(B3,manytable,3,FALSE)

If there is multiple occurences of the Unique ID then it gets a bit more complicated but it is possible, More info would help.

Impossible is Nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top