Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ali ali is offline
external usenet poster
 
Posts: 1
Default Strange vlookup problem?????

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/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Strange vlookup problem?????

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/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Strange vlookup problem?????

try using trim around any entries, I have found this to help when ther
are hidden spaces in words. Also make sure the last input into th
vlookup is true or false depending on if your table is in alphabetica
order.

Keith
www.kjtfs.co

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange vlookup problem thiver Excel Discussion (Misc queries) 4 May 30th 06 11:22 PM
Strange VLOOKUP Problem DMDave Excel Discussion (Misc queries) 6 May 8th 06 02:06 AM
Strange Problem Perry Excel Discussion (Misc queries) 7 April 12th 06 09:52 PM
Strange Vlookup problem peter.thompson Excel Worksheet Functions 2 January 9th 06 04:51 AM
Strange problem Stuart[_8_] Excel Programming 1 October 3rd 03 12:14 AM


All times are GMT +1. The time now is 12:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"