View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default IF, VLOOKUP & LOOKUP TABLE ON OTHER SHEET

"Serge" wrote:
The formula below works ok in the first sheet called "Right-Angled Triangle"
In T27 =IF(ISNA(VLOOKUP(S27,Z4:AA84,2,1)),"",
VLOOKUP(S27,Z4:AA84,2,1)*P27). Lookup table is Z4:AA84

But in sheet 2 called "Oblique-Angled Triangle"
a similar formula does not work.
In U48 =IF(ISNA(VLOOKUP("T48,'Right-Angled
Triangle'!",Z4:AA84,2,1)),"","VLOOKUP(T48,'Right-Angled
Triangle'!,Z4:AA84,2,1)*Q48")
I am trying to use the same table for both sheets.


Some thoughts for the above ..

In sheet: Oblique-Angled Triangle

Try this in U48:
=IF(ISNA(VLOOKUP(T48,'Right-Angled
Triangle'!Z4:AA84,2,1)),"",VLOOKUP(T48,'Right-Angled
Triangle'!Z4:AA84,2,1)*Q48)

Alternatively, it might be easier to create a defined name for the
table_array (in sheet: Right-Angled Triangle) which could then be referred to
in any sheet in the book

One quick way* to create a defined name ..

In sheet: Right-Angled Triangle

Select Z4:AA84 (i.e. the table_array),
then click inside the namebox
(box with the drop-arrow just to the left of the formula bar)
Key-in a name, say: MyTable
then press Enter

Then in sheet: Oblique-Angled Triangle
we could put this shorter version in U48:
=IF(ISNA(VLOOKUP(T48,MyTable,2,1)),"",VLOOKUP(T48, MyTable,2,1)*Q48)

*the normal way would be via clicking Insert Name Define
(Options to create and delete defined names are there. Note that we can't
use the namebox to delete defined names, only to create.)

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---