Using Vlookup for two tables

I have two tables, I want it to look in the A column and compare it to the A column of another table and bring back the value from that tables D column. It is not working....


What I have so far is =VLOOKUP (A2,$'Model/Part #',$Price,FALSE) With the Model part and price coming from the second table.....it does not work. I know that the A2 value is there.

iMac, Mac OS X (10.6.8)

Posted on Jan 19, 2012 10:11 AM

Reply
6 replies

Jan 19, 2012 10:22 AM in response to surmick

It seems that you failed to read iWork Formulas and Functions User Guide which describe the tables's functions.

In iWork apps, VLOOKUP requires a target range in a single table.

To achieve your goal you may/must use LOOKUP

User uploaded file

In main B4, the formula is :

=LOOKUP("CC",table 1 :: $B,table 2 :: $B)


Yvan KOENIG (VALLAURIS, France) jeudi 19 janvier 2012

iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2

My Box account is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

My iDisk is : http://public.me.com/koenigyvan

Jan 19, 2012 12:10 PM in response to surmick

Yvan did not say it cannot be done, he said "To achieve your goal you may/must use LOOKUP". then gave a (very nice) example of exactly how to do it.


The vlookup requires the result being pulled back to be on the same table as the column you are looking up the value on. Lookup does not, it requires a value to look up, then a range to look it up on, and a second range to look at for the return value.


All manuals are located in the Main Support area (you most likely went right past it coming in to here 🙂).

Click the "support" at the top of the apple.com webpage. There is a section for manuals to the left of the Discussions link/picture. Select Mac Os /Software. then productivity software, then iWork. you will see all the manuals for the individual programs listed, along with the function guide.


Lookup is on page 217 under "reference functions" and vlookup is on 223.


Jason

Jan 19, 2012 12:12 PM in response to surmick

surmick wrote:


Well, I looked in the help screen for numbers and that was not discussed, not sure what the iWork Formulas and Functions User Guide

The named resources may be downloaded thru the Help menu.

User uploaded file

is but are you saying i can not do this? because then that means Excel is superior and surely that can not be the case.......

I told the truth.

It doesn't mean tha Numbers is inferior to Excel, just that it's different.

As I wrote, you may achieve your goal with LOOKUP.

What more are you wanting ?


Page 223 in iWork Formulas and Functions User Guide, we may read :

User uploaded file

• columns-range: A range of cells.range is a reference to a single range of cells,

which may contain values of any type.

• return-column: A number that specifies the relative column number of the cell

from which to return the value. return-column is a number value. The leftmost

column in the range is column 1.


This description is clear.

VLOOKUP requires one range of cells, not two.


Yvan KOENIG (VALLAURIS, France) jeudi 19 janvier 2012

iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2

My Box account is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

My iDisk is : http://public.me.com/koenigyvan

Jan 19, 2012 12:44 PM in response to surmick

I think you might be talking about what VLOOKUP does, but your description is not very clear.

I think you want to put a formula in some column of row 2 of table 1 which will look in column A of table 2 for a match for A2 of table 1 and return the value from column D of table 2.


Something like:


=VLOOKUP(A2,Table 2::A:D,4,FALSE)


The first argument (A2) specifies what you are looking to match.

The second argument specifies the range of cell in which you want to look; how you specify this depends on the name of the table and whether you want to restrict the rows to a subset of the table. The first column in this range must be the one where you hope to find a match (Colum A of your second table).

The third argument is a number representing the column in your range from which to get the return value. (Column A is the first in your range; you want D, so this is 4)

The last argument, which can be ommitted, is either TRUE for closematch or FALSE for exact match.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Using Vlookup for two tables

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.