ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   TYPE function (https://www.excelbanter.com/excel-worksheet-functions/198105-type-function.html)

Iriemon

TYPE function
 
I have the following formula but it is not gving me the results I am looking
for:

=IF(TYPE(VLOOKUP(V2,'thread
lookup'!$R$17:$S$24,2,FALSE)=16),1,VLOOKUP(V2,'thr ead
lookup'!$R$17:$S$24,2,FALSE))

The idea is to look for the value in V2 in my lookup table and if the result
is #N/A then return the value 1, otherwise lookup the value in V2 in my
lookup table.

All this formula is returning is 1 for everything.

Can anyone tell me where the formula is incorrect?

Thanks



Mike H

TYPE function
 
Maybe,

=IF(ISNA(VLOOKUP(V2,'Thread lookup'!R17:S24,2,FALSE)),1,VLOOKUP(V2,'Thread
lookup'!R17:S24,2,FALSE))

Mike

"Iriemon" wrote:

I have the following formula but it is not gving me the results I am looking
for:

=IF(TYPE(VLOOKUP(V2,'thread
lookup'!$R$17:$S$24,2,FALSE)=16),1,VLOOKUP(V2,'thr ead
lookup'!$R$17:$S$24,2,FALSE))

The idea is to look for the value in V2 in my lookup table and if the result
is #N/A then return the value 1, otherwise lookup the value in V2 in my
lookup table.

All this formula is returning is 1 for everything.

Can anyone tell me where the formula is incorrect?

Thanks



Max

TYPE function
 
One usual way is to use ISNA, viz:
=IF(ISNA(VLOOKUP(V2,'thread lookup'!$R$17:$S$24,2,0)),1,VLOOKUP(V2,'thread
lookup'!$R$17:$S$24,2,0))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:17,000 Files:358 Subscribers:55
xdemechanik
---
"Iriemon" wrote:
I have the following formula but it is not gving me the results I am looking
for:

=IF(TYPE(VLOOKUP(V2,'thread
lookup'!$R$17:$S$24,2,FALSE)=16),1,VLOOKUP(V2,'thr ead
lookup'!$R$17:$S$24,2,FALSE))

The idea is to look for the value in V2 in my lookup table and if the result
is #N/A then return the value 1, otherwise lookup the value in V2 in my
lookup table.

All this formula is returning is 1 for everything.

Can anyone tell me where the formula is incorrect?

Thanks



Iriemon

TYPE function
 
THANKS GUYS!

Perfect!

"Iriemon" wrote:

I have the following formula but it is not gving me the results I am looking
for:

=IF(TYPE(VLOOKUP(V2,'thread
lookup'!$R$17:$S$24,2,FALSE)=16),1,VLOOKUP(V2,'thr ead
lookup'!$R$17:$S$24,2,FALSE))

The idea is to look for the value in V2 in my lookup table and if the result
is #N/A then return the value 1, otherwise lookup the value in V2 in my
lookup table.

All this formula is returning is 1 for everything.

Can anyone tell me where the formula is incorrect?

Thanks




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

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