ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Nested VLOOKUP in IF statement (https://www.excelbanter.com/excel-programming/410920-nested-vlookup-if-statement.html)

[email protected]

Nested VLOOKUP in IF statement
 
=IF(H5=$C$2,"=VLOOKUP(H4,$B$5:$C$11,2,FALSE)",0)

Hi all,

Above is my simple nested vlookup statement.
The problem is, it may be too simple.
Basically I'd like for this vlookup statement to run when the
condition is met.

When the condition is true, the result is "=VLOOKUP(H4,$B$5:$C
$11,2,FALSE)"
printed in the cell as a value instead of returning the formula
result.

I've tried the following without success...

=IF(H5=$C$2,"VLOOKUP(H4,$B$5:$C$11,2,FALSE)",0) <--- without the =
=IF(H5=$C$2,=VLOOKUP(H4,$B$5:$C$11,2,FALSE),0) <--- without the
"quotes"

Is there something I'm doing wrong?

Cheers

minli

Nested VLOOKUP in IF statement
 
=IF(H5=$C$2,VLOOKUP(H4,$B$5:$C$11,2,FALSE),0)

" wrote:

=IF(H5=$C$2,"=VLOOKUP(H4,$B$5:$C$11,2,FALSE)",0)

Hi all,

Above is my simple nested vlookup statement.
The problem is, it may be too simple.
Basically I'd like for this vlookup statement to run when the
condition is met.

When the condition is true, the result is "=VLOOKUP(H4,$B$5:$C
$11,2,FALSE)"
printed in the cell as a value instead of returning the formula
result.

I've tried the following without success...

=IF(H5=$C$2,"VLOOKUP(H4,$B$5:$C$11,2,FALSE)",0) <--- without the =
=IF(H5=$C$2,=VLOOKUP(H4,$B$5:$C$11,2,FALSE),0) <--- without the
"quotes"

Is there something I'm doing wrong?

Cheers


[email protected]

Nested VLOOKUP in IF statement
 
On May 14, 6:38*pm, minli wrote:
=IF(H5=$C$2,VLOOKUP(H4,$B$5:$C$11,2,FALSE),0)



" wrote:
=IF(H5=$C$2,"=VLOOKUP(H4,$B$5:$C$11,2,FALSE)",0)


Hi all,


Above is my simple nested vlookup statement.
The problem is, it may be too simple.
Basically I'd like for this vlookup statement to run when the
condition is met.


When the condition is true, the result is "=VLOOKUP(H4,$B$5:$C
$11,2,FALSE)"
printed in the cell as a value instead of returning the formula
result.


I've tried the following without success...


=IF(H5=$C$2,"VLOOKUP(H4,$B$5:$C$11,2,FALSE)",0) *<--- without the =
=IF(H5=$C$2,=VLOOKUP(H4,$B$5:$C$11,2,FALSE),0) * <--- without the
"quotes"


Is there something I'm doing wrong?


Cheers- Hide quoted text -


- Show quoted text -


Thank you.
Works a charm


All times are GMT +1. The time now is 03:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com