I am using vlookup to return values (lets say values A-I) based on other
values (Values 1-10) in column A.
Sometimes there is no value in column A and I'd like vlookup to return a
value "blank cell" or whatever I define.
Right now blank cells return N/A.
I am guessing there is something simply I can do there.
Thanks in advance
bmac
JE McGimpsey - 22 Oct 2007 05:35 GMT
One way:
=IF(ISNA(MATCH(J1,A:A,FALSE)),"blank cell",VLOOKUP(J1,A:B,2,FALSE))
> I am using vlookup to return values (lets say values A-I) based on other
> values (Values 1-10) in column A.
[quoted text clipped - 6 lines]
>
> bmac
bam - 23 Oct 2007 00:34 GMT
Thanks very much!
> One way:
>
[quoted text clipped - 10 lines]
>>
>> bmac
T. Valko - 22 Oct 2007 05:43 GMT
One way:
Assuming the lookup_value is in cell D1.
=IF(COUNTIF(A1:A10,D1),VLOOKUP(D1,A1:B10,2,0),"your_message_here")

Signature
Biff
Microsoft Excel MVP
>I am using vlookup to return values (lets say values A-I) based on other
>values (Values 1-10) in column A.
[quoted text clipped - 6 lines]
>
> bmac
bam - 23 Oct 2007 00:34 GMT
Thanks very much!
> One way:
>
[quoted text clipped - 12 lines]
>>
>> bmac
T. Valko - 23 Oct 2007 07:11 GMT
You're welcome!

Signature
Biff
Microsoft Excel MVP
> Thanks very much!
>> One way:
[quoted text clipped - 13 lines]
>>>
>>> bmac