suspect the table contains the string 123 rather than the number 123
something to try:
=vlookup(Text(123,"#"),Table,2,False)
to handle both
asume your value is in A1
=if(iserror(vlookup(A1,Table,2,false)),vlookup(Tex t(A1,"#"),Table,2,False),V
lookup(a1,Table,2,False))
Or clean up the data in your table.
--
Regards,
Tom Ogilvy
ali wrote in message
...
Hi,
I'm running a vlookup of a number that appears as the result of a
macro.
However the vlookup is not working (#N/a appears). If i retype the
number - instead of using the result output by the macro it still
doesn't work.
However if i copy the number from the table being used inthe vlookup it
works just fine and produces the expected results. Anyone got any
ideas why this is happening and more importantly, any ideas how i can
fix this please?
---
Message posted from http://www.ExcelForum.com/