Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default VLOOKUP Keeps Returning #N/A

I have 2 columns of account numbers and all I'm trying to do is identify
which accounts in Column A are also in Column B.

The formula I'm using is vlookup(A2,B:B,1,False) and I keep receiving the
#N/A stating "A value is not available to the formula or function."

Column A has the ' at the beginning of the account numbers, I believe in
order to prevent the 17 digit number from being concatenated. There are
approx. 42k numbers/cells.
Column B has the 17 digit numbers as well but no '. The numbers do appear to
have some extra spaces at the end of the cell for some reason. There are
approx. 5k numbers/cells

I did sort Column B (the table array) in ascending order.

I don't know if the formatting, ', or spaces is affecting the formula. When
I use True instead of False, I do get a result but its wrong.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default VLOOKUP Keeps Returning #N/A

Use

vlookup(TRIM(A2),B:B,1,False)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Ric_M" wrote in message ...
|I have 2 columns of account numbers and all I'm trying to do is identify
| which accounts in Column A are also in Column B.
|
| The formula I'm using is vlookup(A2,B:B,1,False) and I keep receiving the
| #N/A stating "A value is not available to the formula or function."
|
| Column A has the ' at the beginning of the account numbers, I believe in
| order to prevent the 17 digit number from being concatenated. There are
| approx. 42k numbers/cells.
| Column B has the 17 digit numbers as well but no '. The numbers do appear to
| have some extra spaces at the end of the cell for some reason. There are
| approx. 5k numbers/cells
|
| I did sort Column B (the table array) in ascending order.
|
| I don't know if the formatting, ', or spaces is affecting the formula. When
| I use True instead of False, I do get a result but its wrong.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default VLOOKUP Keeps Returning #N/A

thank you for your quick reply. Your suggestion didn't work. Still getting
the same error. Is the TRIM command to ignore the ' ? Do I need to be
concerned about the spaces following all the numbers in my second column?

"Niek Otten" wrote:

Use

vlookup(TRIM(A2),B:B,1,False)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Ric_M" wrote in message ...
|I have 2 columns of account numbers and all I'm trying to do is identify
| which accounts in Column A are also in Column B.
|
| The formula I'm using is vlookup(A2,B:B,1,False) and I keep receiving the
| #N/A stating "A value is not available to the formula or function."
|
| Column A has the ' at the beginning of the account numbers, I believe in
| order to prevent the 17 digit number from being concatenated. There are
| approx. 42k numbers/cells.
| Column B has the 17 digit numbers as well but no '. The numbers do appear to
| have some extra spaces at the end of the cell for some reason. There are
| approx. 5k numbers/cells
|
| I did sort Column B (the table array) in ascending order.
|
| I don't know if the formatting, ', or spaces is affecting the formula. When
| I use True instead of False, I do get a result but its wrong.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default VLOOKUP Keeps Returning #N/A

Did you get your data from the web? Then there may be non-breaking spaces in them, which are not removed by the TRIM() function.
In that case, have a look he

http://www.mvps.org/dmcritchie/excel/join.htm#trimall

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Ric_M" wrote in message ...
| thank you for your quick reply. Your suggestion didn't work. Still getting
| the same error. Is the TRIM command to ignore the ' ? Do I need to be
| concerned about the spaces following all the numbers in my second column?
|
| "Niek Otten" wrote:
|
| Use
|
| vlookup(TRIM(A2),B:B,1,False)
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
| "Ric_M" wrote in message ...
| |I have 2 columns of account numbers and all I'm trying to do is identify
| | which accounts in Column A are also in Column B.
| |
| | The formula I'm using is vlookup(A2,B:B,1,False) and I keep receiving the
| | #N/A stating "A value is not available to the formula or function."
| |
| | Column A has the ' at the beginning of the account numbers, I believe in
| | order to prevent the 17 digit number from being concatenated. There are
| | approx. 42k numbers/cells.
| | Column B has the 17 digit numbers as well but no '. The numbers do appear to
| | have some extra spaces at the end of the cell for some reason. There are
| | approx. 5k numbers/cells
| |
| | I did sort Column B (the table array) in ascending order.
| |
| | I don't know if the formatting, ', or spaces is affecting the formula. When
| | I use True instead of False, I do get a result but its wrong.
|
|
|


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default VLOOKUP Keeps Returning #N/A

Great news! I used TRIM for both columns to get rid of the spaces and ' and
the vlookup worked. Thansk so much.

"Niek Otten" wrote:

Use

vlookup(TRIM(A2),B:B,1,False)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Ric_M" wrote in message ...
|I have 2 columns of account numbers and all I'm trying to do is identify
| which accounts in Column A are also in Column B.
|
| The formula I'm using is vlookup(A2,B:B,1,False) and I keep receiving the
| #N/A stating "A value is not available to the formula or function."
|
| Column A has the ' at the beginning of the account numbers, I believe in
| order to prevent the 17 digit number from being concatenated. There are
| approx. 42k numbers/cells.
| Column B has the 17 digit numbers as well but no '. The numbers do appear to
| have some extra spaces at the end of the cell for some reason. There are
| approx. 5k numbers/cells
|
| I did sort Column B (the table array) in ascending order.
|
| I don't know if the formatting, ', or spaces is affecting the formula. When
| I use True instead of False, I do get a result but its wrong.





  #6   Report Post  
Junior Member
 
Posts: 1
Default

Hi

Here is also a good video that covers all common examples when vlookup keeps returning na and at the top there are links to more videos related to vlookup.

Take care
Katie & Emil
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 169
Default VLOOKUP Keeps Returning #N/A

Both the spaces and the ' will affect the VLOOKUP. VLOOKUP is literally
looking for exact matches. You can try adding a column and using the VALUE
function to convert the cells with the ' and spaces to regular numbers.
--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


"Ric_M" wrote:

I have 2 columns of account numbers and all I'm trying to do is identify
which accounts in Column A are also in Column B.

The formula I'm using is vlookup(A2,B:B,1,False) and I keep receiving the
#N/A stating "A value is not available to the formula or function."

Column A has the ' at the beginning of the account numbers, I believe in
order to prevent the 17 digit number from being concatenated. There are
approx. 42k numbers/cells.
Column B has the 17 digit numbers as well but no '. The numbers do appear to
have some extra spaces at the end of the cell for some reason. There are
approx. 5k numbers/cells

I did sort Column B (the table array) in ascending order.

I don't know if the formatting, ', or spaces is affecting the formula. When
I use True instead of False, I do get a result but its wrong.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default VLOOKUP Keeps Returning #N/A

Thansk for the reply. When I use VALUE, the numbers are concatenated and I
don;t want that.

"M Kan" wrote:

Both the spaces and the ' will affect the VLOOKUP. VLOOKUP is literally
looking for exact matches. You can try adding a column and using the VALUE
function to convert the cells with the ' and spaces to regular numbers.
--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


"Ric_M" wrote:

I have 2 columns of account numbers and all I'm trying to do is identify
which accounts in Column A are also in Column B.

The formula I'm using is vlookup(A2,B:B,1,False) and I keep receiving the
#N/A stating "A value is not available to the formula or function."

Column A has the ' at the beginning of the account numbers, I believe in
order to prevent the 17 digit number from being concatenated. There are
approx. 42k numbers/cells.
Column B has the 17 digit numbers as well but no '. The numbers do appear to
have some extra spaces at the end of the cell for some reason. There are
approx. 5k numbers/cells

I did sort Column B (the table array) in ascending order.

I don't know if the formatting, ', or spaces is affecting the formula. When
I use True instead of False, I do get a result but its wrong.

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
Vlookup returning #N/A when it should not robs3131 Excel Worksheet Functions 10 November 10th 09 05:32 PM
Vlookup returning #n/a TRYIN Excel Worksheet Functions 2 February 8th 08 07:56 PM
vlookup returning #NA dandigger Excel Discussion (Misc queries) 11 April 6th 05 11:13 PM
Vlookup returning #N/A ww Excel Worksheet Functions 2 March 23rd 05 12:24 AM
Vlookup and returning #n/a Cathrine Excel Worksheet Functions 3 December 23rd 04 02:23 PM


All times are GMT +1. The time now is 10:49 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"