looking up a value thas a colom accross from data already looked up


Posted by CHRIS on February 14, 2001 6:25 AM

How would i use a macro or an excell function to look up 2 values simultaniosly in a database? what i want it to look up is a bookname then the price of that book?
Thanks
Chris

Posted by Mark W. on February 14, 2001 6:54 AM

A Database function such as DGET might work, but
you need to provide more information about your
database including the uniqueness of its records.

Posted by Dave Hawley on February 14, 2001 7:15 AM


Hi Chris

If I have understood you then a simple VLOOKUP should work
=VLOOKUP("War and Peace",A1:F200,3,FALSE)

Where "War and Peace" is the book, A1:F200 is the table of data, and 3 is the third Columns arcoss from Column A which contains the book names. False is find an exact match.


DaveOzGrid Business Applications

Posted by Mark W. on February 14, 2001 7:30 AM

Dave, I believe he wants to return 2 values -- a
bookname and it's price. Using VLOOKUP() that would
necessitate an array constant as the 3rd argument.
I'm still uncertain about his lookup value. If
it's the bookname (as you suspect) then why would
Chris want to return a value that he already has?
Questions, questions, questions... the devil is
always in the details.

Posted by CHRIS on February 15, 2001 4:14 AM

well its is a table of containing bookname, isbn number, book value, publisher and dte of publication.

what i want to do is to find out how much a book cost after ive enterd the name into a cell i want it to return the book price into the cell next to it

sorrey if what i said wasnt clear



Posted by Mark W. on February 15, 2001 5:41 AM

See Dave's response above.