Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Double Lookups - Death by #N/A !!!

Hope someone can rescue me here...I am in the homestretch of an exciting
(at least to me) spreadsheet that involves multiple Rankings, Tables,
Lookups, etc.

Here is the sticking point: I need to do a DOUBLE LOOKUP in a table,
and have thoroughly read and applied Chip Pearson’s excellent examples
on Double Lookups on his website.

I believe my problem stems from the fact that I am referencing the two
required reference cells from cells that they themselves are calculating
a Lookup, so, in essence, it is a short chain of Lookups. The first
Lookup works great, and shows the proper Values in the cells for the
output. The second Lookup via the Pearson method references these two
cells for the output, but returns #N/A. Reading through the Excel
documentation leads me to believe that the problem is that it is
referencing something that also must lookup something, kind of like a
Loop or something?

In any event, I have tried everything to the extent of my Excel
knowledge, using Value to pass the number over to another cell, etc.
Nothing has worked so far. I have even named the tables in case that
might have something to do with it as well...it didn’t...LOL.

I tried manually typing in the outputted numbers from the first lookup
and then set up the second Lookup to reference these Values instead of
the cell that does a lookup and it worked perfectly. I therefore feel
the problem is as I mentioned before, a Lookup referencing another
previous Lookup cell. If this can be done without VB, and simply
through formulas, I would truly be grateful!

Example code follows:

This is the 1st Lookup...
=IF(A5="",0,IF(M5=0,0.01,VLOOKUP(I5,PF,2)))
--------outputs 0.26

This is the 2nd Lookup...
=OFFSET($U$1,MATCH(O$20,TPF,0),MATCH(O5,IPF,0))
--------outputs #N/A

PF is the first-named Table, TPF is the first Column in the 2nd Table,
and IPF is the first Row in the 2nd Table, with $U$1 being the anchor
point for that 2nd table (no data).



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Double Lookups - Death by #N/A !!!

select the cell with the double lookup formula

highlight the O$20 in the formula bar, hit F9 - what value does it show

hit esc
Select MATCH(O$20,TPF,0) in the formula bar - what does it show
hit esc

work through the various parts of your formulas and see if you can find the
problem. #N/A indicates the value being looked up has not been found. But
I don't see anything in your description that would indicate this is a
processing or systemic problem with excel. I would be more inclined to
believe that something in your formula is incorrect.

--
Regards,
Tom Ogilvy


"Sandy Pasdak" wrote in message
...
Hope someone can rescue me here...I am in the homestretch of an exciting
(at least to me) spreadsheet that involves multiple Rankings, Tables,
Lookups, etc.

Here is the sticking point: I need to do a DOUBLE LOOKUP in a table,
and have thoroughly read and applied Chip Pearson's excellent examples
on Double Lookups on his website.

I believe my problem stems from the fact that I am referencing the two
required reference cells from cells that they themselves are calculating
a Lookup, so, in essence, it is a short chain of Lookups. The first
Lookup works great, and shows the proper Values in the cells for the
output. The second Lookup via the Pearson method references these two
cells for the output, but returns #N/A. Reading through the Excel
documentation leads me to believe that the problem is that it is
referencing something that also must lookup something, kind of like a
Loop or something?

In any event, I have tried everything to the extent of my Excel
knowledge, using Value to pass the number over to another cell, etc.
Nothing has worked so far. I have even named the tables in case that
might have something to do with it as well...it didn't...LOL.

I tried manually typing in the outputted numbers from the first lookup
and then set up the second Lookup to reference these Values instead of
the cell that does a lookup and it worked perfectly. I therefore feel
the problem is as I mentioned before, a Lookup referencing another
previous Lookup cell. If this can be done without VB, and simply
through formulas, I would truly be grateful!

Example code follows:

This is the 1st Lookup...
=IF(A5="",0,IF(M5=0,0.01,VLOOKUP(I5,PF,2)))
--------outputs 0.26

This is the 2nd Lookup...
=OFFSET($U$1,MATCH(O$20,TPF,0),MATCH(O5,IPF,0))
--------outputs #N/A

PF is the first-named Table, TPF is the first Column in the 2nd Table,
and IPF is the first Row in the 2nd Table, with $U$1 being the anchor
point for that 2nd table (no data).



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Double Lookups - Death by #N/A !!!

Thanks Tom!

Your info was great...I never knew about the F9 check. That is a very
handy feature. You were right - I checked each component and the
culprit was the MATCH(O$20,TPF,0)being set to Zero instead of "1."

Thanks again...the spreadsheet rocks now!

Sandy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating age of death Annie Excel Worksheet Functions 17 May 14th 23 11:42 AM
Birth,Death & Marriage Index family history man New Users to Excel 2 August 24th 09 12:47 PM
Double Lookups AFA Excel Worksheet Functions 3 September 19th 07 03:53 AM
LOOKUPS - Creating LOOKUPs where two different values must BOTH be satisfied. Mr Wiffy Excel Worksheet Functions 2 May 16th 05 04:29 AM
Double Lookups Philippe L. Balmanno Excel Worksheet Functions 11 November 11th 04 10:33 PM


All times are GMT +1. The time now is 07:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"