Database Connection Nested VLookup option

Giganews Newsgroups
Subject: Database Connection Nested VLookup option
Posted by:  needyouradvice (
Date: Mon, 8 May 2006

I'm lost on this one.  My train of thought seems simple, but I can't get
it to work.

Here is an example:

Excel Workbook with 2 Spreadsheets
Spreadsheet 1 is called: Server_Connect
Spreadsheet 2 is called: Totals

The Server_Connect sheet is queried to a SQL Database.  The only thing
that stays the sames is the columns.  All other information is
constantly changing.

The Totals sheet is broken up.  Its not uniform so each and every cell
will have to contain a variant of the V or H lookup formulas.  No easy
way out of this one.

Ok.  Here is the problem, in Sheet1 (Server_Connect) I have 3 Columns:

Name  StockID  CountofStockID

I need to do a lookup function that will lookup by name, then by
StockID and print the CountofStockID number in my selected cell.
That’s it, but I can't figure it out.  I keep getting the usual #NUM or
#N/A error.  I tried every know command to no avail.
if(Name="Bob"(Hlookup...)) etc.  The idea is there, but the numbers
just aren't.

Thank you for any info,

needyouradvice's Profile:
View this thread: