LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Adam Kroger
 
Posts: n/a
Default Complicated formula not working in 97

Below is the formula (spaced to make the IFs easier to read).

=IF(
AND(AND(ISTEXT(B4),NOT(B4="")),AND(ISTEXT($B$1),NO T($B$1=""))),
==TRUE
IF($B$1="IS_weap_list",
==#NAME?
IF(HasFormula(VLOOKUP(B28,IS_weap_table,MATCH("Dam ",IS_weap_head,0),0)),
==TRUE
UseSameAs(VLOOKUP(B28,IS_weap_table,
MATCH("Dam",IS_weap_head,0),0)), ==NAME?
VLOOKUP(B28,IS_weap_table, MATCH("Dam",IS_weap_head,0),0)),
==NAME?
IF(HasFormula(VLOOKUP(B28,CL_weap_table,
MATCH("Dam",CL_weap_head,0),0)), ==#VALUE!
UseSameAs(VLOOKUP(B28,CL_weap_table,
MATCH("Dam",CL_weap_head,0),0)), ==#VALUE!
VLOOKUP(B28,CL_weap_table, MATCH("Dam",CL_weap_head,0),0))),
==#N/A
"")
==""

The functions HasFormula, and UseAs are UDFs from
http://www.mvps.org/dmcritchie/excel/formula.htm They are inserted in their
own module.
The result of the formula is #Value

The following data is in the cells referenced.
B1 = IS_weap_list
B28 = ER Large Laser
The lookup retuns a formula under "Dam"


The formula:
=IF(ISTEXT(B5),
IF($B$1="IS_weap_list",VLOOKUP(B5,IS_weap_table,MA TCH("Dam",IS_weap_head,0),0),
IF($B$1="CL_weap_list",VLOOKUP(B5,CL_weap_table, MATCH("Dam",
CL_weap_head,0),0),"")),"")


Returns the proper value of 8





 
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
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
COUNTA Formula not working Scudo New Users to Excel 8 November 28th 05 10:27 PM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Creat a formula to calculate working hrs according to number of da Bren Excel Worksheet Functions 2 August 1st 05 12:57 PM
Formula entered not working Thrava Excel Discussion (Misc queries) 5 March 6th 05 09:18 PM


All times are GMT +1. The time now is 08:44 AM.

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

About Us

"It's about Microsoft Excel"