how can i use the ISNA and Vlookup funtions in a macro?

J

Jack

I would like to use the Vlookup function in a macro, and the ISNA function.
Can this be done?
 
J

Jim Thomlinson

You can but you don't have to...

=if(isna(vlookup(This, InThat, 2,false)), "Not Found", vlookup(This, InThat,
2,false))

or you can use CountIf

=if(countif(InThat, This)=0, "Not Found", vlookup(This, InThat, 2,false))

I prefer the second method, but it is up to you...
 
J

Jack

Thanks
i was trying to use a macro to cut down on the size of the file and the
number of cells with the long formula

i will try the countif
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top