Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VLOOKUP cannot find numeric values

I have a VLookup function that searches an external file for values.
The format in column A of the file is 'general', and all the numbers
are 'text numbers'.

In my spreadsheet, the column, column A, used as the lookup value is
also formatted as 'general', and there may be text or numeric values in
that column. When I do my VLOOKUP:

Range("B8").Select
' col A is the lookup val, hence RC[-1]. New_desc is named range in ext
file

ActiveCell.FormulaR1C1 =
"=VLOOKUP(RC[-1],'C:\Docs\a\MyDocs\lookupList.xls'!New_desc,2,FALS E)"

it can find all the text values, but all numeric values come back as
#N/A. If I change my column A in my spreadsheet to Text, then I get
back #NAME for all values.

Any ideas why numbers cannot be found (there are matches in the ext
file)? Do they have to be in the same numbet format?

-Phil

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default VLOOKUP cannot find numeric values

If it is looking for a numeric value in a text column, it won't match. If
the id values in the lookup table are all text, you could convert the lookup
value, like so TEXT(1,"0")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"philserve" wrote in message
oups.com...
I have a VLookup function that searches an external file for values.
The format in column A of the file is 'general', and all the numbers
are 'text numbers'.

In my spreadsheet, the column, column A, used as the lookup value is
also formatted as 'general', and there may be text or numeric values in
that column. When I do my VLOOKUP:

Range("B8").Select
' col A is the lookup val, hence RC[-1]. New_desc is named range in ext
file

ActiveCell.FormulaR1C1 =
"=VLOOKUP(RC[-1],'C:\Docs\a\MyDocs\lookupList.xls'!New_desc,2,FALS E)"

it can find all the text values, but all numeric values come back as
#N/A. If I change my column A in my spreadsheet to Text, then I get
back #NAME for all values.

Any ideas why numbers cannot be found (there are matches in the ext
file)? Do they have to be in the same numbet format?

-Phil



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
TO DELETE ONLY NUMERIC VALUES IN A CHARACTER AND NUMERIC CELL IN ramesh k. goyal - abohar[_2_] Excel Discussion (Misc queries) 1 October 28th 09 06:50 AM
VLOOKUP with numeric and alphanumeric values Dan Excel Discussion (Misc queries) 6 November 2nd 07 04:59 PM
Find and Return Numeric Label based on (Numeric Value) Criterion Sam via OfficeKB.com Excel Worksheet Functions 2 September 18th 06 11:20 PM
Find Numeric Criterion in Column & Return the Numeric Value from Row above Sam via OfficeKB.com Excel Worksheet Functions 6 April 27th 06 02:50 PM
Numeric in Text to convert back to the form of Numeric for VLookup Purposes achilles Excel Discussion (Misc queries) 4 February 6th 06 07:05 AM


All times are GMT +1. The time now is 10:41 PM.

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

About Us

"It's about Microsoft Excel"