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

Hi Serge!

Your second lookup formula has some double quotes (") and some commas (,)
that are causing the problem. Try this cleaned-up version:

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

=IF(OR(A48="",B48="",C48=""),0,A48*(SIN(RADIANS(C4 8)/(SIN(RADIANS(B48))))))
The answer to this formula is 21.416 which is incorrect
The calculator answer is 21.5407 which is correct.


If the values referencd are user input and not calculated........

You have a misplaced ")" which changes the precedence of the calculation:

=IF(OR(A48="",B48="",C48=""),0,A48*(SIN(RADIANS(C4 8)/(SIN(RADIANS(B48))))))

The answer to this formula is 21.416 which is incorrect


Returns: 21.4148138423053

Matching up the ( ) to:

=IF(OR(A48="",B48="",C48=""),0,A48*SIN(RADIANS(C48 ))/SIN(RADIANS(B48)))

The calculator answer is 21.5407 which is correct.


Returns: 21.539294831829

Biff

"Serge" wrote in message
...
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.

also one more question if it's ok.
I'm not getting the correct answer?
In A48, B48, C48 will be user input which will be empty at the beginning.
In E48
=IF(OR(A48="",B48="",C48=""),0,A48*(SIN(RADIANS(C4 8)/(SIN(RADIANS(B48))))))
The answer to this formula is 21.416 which is incorrect
Oblique Triangle solution:
Side a in A48=25.0
Angle A in B48=79.94 Degrees
Angle B in C48=58.03 Degrees

Side 'b' = a x sin 'B' / sin 'A'
The calculator answer is 21.5407 which is correct.

What am I doing wrong?