#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Problem with VLookup

Hi, If I type a value into the cell which is the reference for the Vlookup i
get the error "#N/A" yet if i copy and paste the same number from the lookup
column into the reference cell it works perfectly, I am guessing that somehow
there is a formatting issue with the data that comes from the database
(Access) and Excel I am just not sure what it is, I have pasted the data into
Notepad to see if there is anything added in the formatting but it is still
exactly the same as I typed. But if I then try and copy that back into the
reference cell I get the same error. Just wondering if anybody has got any
ideas how to fix this annoying problem.

Many Thanks

Windows Xp pro
Office 2003
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 136
Default Problem with VLookup

The data from Access is probably text whereas the data you type into the
cell is
a number, copy an empty cell formatted as general or number and select all
the imported numbers, then do paste special and select add. That will force
any numbers formatted as text to turn into matching numbers.



--


Regards,


Peo Sjoblom


"Bob1866" wrote in message
...
Hi, If I type a value into the cell which is the reference for the Vlookup
i
get the error "#N/A" yet if i copy and paste the same number from the
lookup
column into the reference cell it works perfectly, I am guessing that
somehow
there is a formatting issue with the data that comes from the database
(Access) and Excel I am just not sure what it is, I have pasted the data
into
Notepad to see if there is anything added in the formatting but it is
still
exactly the same as I typed. But if I then try and copy that back into the
reference cell I get the same error. Just wondering if anybody has got any
ideas how to fix this annoying problem.

Many Thanks

Windows Xp pro
Office 2003



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Problem with VLookup

You may have values in your lookup table which look like numbers but
which are actually text values, and the lookup item is a proper number
(or vice-versa). Ways around this a

=VLOOKUP(A1&"",table,column,0)

and:

=VLOOKUP(A1*1,table,column,0)

The first one converts the lookup value to text if you have text
values in your table, whereas the second one converts it to numbers if
that's what you have in your table. You can make this more universal
like this:

=IF(ISNA(VLOOKUP(A1&"",table,column,0)),IF(ISNA(VL OOKUP
(A1*1,table,column,0)),"not present",VLOOKUP(A1*1,table,column,
0)),VLOOKUP(A1&"",table,column,0))

You will need to substitute your table range and a suitable number for
column, and I have assumed that you are trying to match on a lookup
value in A1.

Hope this helps.

Pete

On Nov 5, 11:53*pm, Bob1866 wrote:
Hi, If I type a value into the cell which is the reference for the Vlookup i
get the error "#N/A" yet if i copy and paste the same number from the lookup
column into the reference cell it works perfectly, I am guessing that somehow
there is a formatting issue with the data that comes from the database
(Access) and Excel I am just not sure what it is, I have pasted the data into
Notepad to see if there is anything added in the formatting but it is still
exactly the same as I typed. But if I then try and copy that back into the
reference cell I get the same error. Just wondering if anybody has got any
ideas how to fix this annoying problem.

Many Thanks

Windows Xp pro
Office 2003


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Problem with VLookup

Sounds like the data coming from Access contains maybe extra space(s)

In a helper cell enter =LEN(cellref) for one of the cells in your table.

Same length as what you type into the reference cell?

Or perhaps the values from Access look like numbers but are actually text?

Format all to General.

Copy an empty cell.

Select the table range and paste specialaddokesc to coerce the cells to
become numbers.


Gord Dibben MS Excel MVP



On Thu, 5 Nov 2009 15:53:03 -0800, Bob1866
wrote:

Hi, If I type a value into the cell which is the reference for the Vlookup i
get the error "#N/A" yet if i copy and paste the same number from the lookup
column into the reference cell it works perfectly, I am guessing that somehow
there is a formatting issue with the data that comes from the database
(Access) and Excel I am just not sure what it is, I have pasted the data into
Notepad to see if there is anything added in the formatting but it is still
exactly the same as I typed. But if I then try and copy that back into the
reference cell I get the same error. Just wondering if anybody has got any
ideas how to fix this annoying problem.

Many Thanks

Windows Xp pro
Office 2003


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 61
Default Problem with VLookup

Hi,

I think that the cell that contains the reference is formatted as text.
Change it to number.

Or, modify the VLOOKUP formula as follows:
=VLOOKUP(A1*1,lookuprange, ) where A1 is the reference cell. The
"A1*1" in the formula will treat the text in A1 as a number.

Please click "Yes" if the solves your problem.

Regards,
B. R. Ramachandran

"Bob1866" wrote:

Hi, If I type a value into the cell which is the reference for the Vlookup i
get the error "#N/A" yet if i copy and paste the same number from the lookup
column into the reference cell it works perfectly, I am guessing that somehow
there is a formatting issue with the data that comes from the database
(Access) and Excel I am just not sure what it is, I have pasted the data into
Notepad to see if there is anything added in the formatting but it is still
exactly the same as I typed. But if I then try and copy that back into the
reference cell I get the same error. Just wondering if anybody has got any
ideas how to fix this annoying problem.

Many Thanks

Windows Xp pro
Office 2003



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Problem with VLookup

Hi, Many thanks for your reply, I have tried your suggestion but to no avail,
the only difference was that the vlookup no longer worked if I copied and
pasted the text into the reference cell from the lookup column. I have
already set the formatting to Number, I have also tried a custom format
aswell but neither seem to make any difference.

Below is the Vlookup code I am using

=VLOOKUP(AA9,AB7:AG9999,1,FALSE)

And this is how I interpreted your solution

=VLOOKUP(AA9*1,AB7:AG9999,1,FALSE)

If I have got this wrong please let me know.

Many Thanks.

Windows Xp pro
Office 2003


"B. R.Ramachandran" wrote:

Hi,

I think that the cell that contains the reference is formatted as text.
Change it to number.

Or, modify the VLOOKUP formula as follows:
=VLOOKUP(A1*1,lookuprange, ) where A1 is the reference cell. The
"A1*1" in the formula will treat the text in A1 as a number.

Please click "Yes" if the solves your problem.

Regards,
B. R. Ramachandran

"Bob1866" wrote:

Hi, If I type a value into the cell which is the reference for the Vlookup i
get the error "#N/A" yet if i copy and paste the same number from the lookup
column into the reference cell it works perfectly, I am guessing that somehow
there is a formatting issue with the data that comes from the database
(Access) and Excel I am just not sure what it is, I have pasted the data into
Notepad to see if there is anything added in the formatting but it is still
exactly the same as I typed. But if I then try and copy that back into the
reference cell I get the same error. Just wondering if anybody has got any
ideas how to fix this annoying problem.

Many Thanks

Windows Xp pro
Office 2003

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Problem with VLookup

Hi, Many thanks for your help, I have now managed to fix the problem, the
issue was caused because the database format was set as text and not number,
but it works fine now.

Thanks

"Bob1866" wrote:

Hi, Many thanks for your reply, I have tried your suggestion but to no avail,
the only difference was that the vlookup no longer worked if I copied and
pasted the text into the reference cell from the lookup column. I have
already set the formatting to Number, I have also tried a custom format
aswell but neither seem to make any difference.

Below is the Vlookup code I am using

=VLOOKUP(AA9,AB7:AG9999,1,FALSE)

And this is how I interpreted your solution

=VLOOKUP(AA9*1,AB7:AG9999,1,FALSE)

If I have got this wrong please let me know.

Many Thanks.

Windows Xp pro
Office 2003


"B. R.Ramachandran" wrote:

Hi,

I think that the cell that contains the reference is formatted as text.
Change it to number.

Or, modify the VLOOKUP formula as follows:
=VLOOKUP(A1*1,lookuprange, ) where A1 is the reference cell. The
"A1*1" in the formula will treat the text in A1 as a number.

Please click "Yes" if the solves your problem.

Regards,
B. R. Ramachandran

"Bob1866" wrote:

Hi, If I type a value into the cell which is the reference for the Vlookup i
get the error "#N/A" yet if i copy and paste the same number from the lookup
column into the reference cell it works perfectly, I am guessing that somehow
there is a formatting issue with the data that comes from the database
(Access) and Excel I am just not sure what it is, I have pasted the data into
Notepad to see if there is anything added in the formatting but it is still
exactly the same as I typed. But if I then try and copy that back into the
reference cell I get the same error. Just wondering if anybody has got any
ideas how to fix this annoying problem.

Many Thanks

Windows Xp pro
Office 2003

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 problem Tom Excel Discussion (Misc queries) 11 March 4th 09 07:11 PM
Vlookup problem Amnon Wilensky Excel Worksheet Functions 3 March 1st 09 07:22 AM
VLOOKUP Problem Ross Excel Discussion (Misc queries) 1 June 20th 06 05:01 PM
VLookUp problem Louise Excel Worksheet Functions 2 May 22nd 06 04:27 PM
VLOOKUP problem Stevie D Excel Worksheet Functions 5 March 8th 06 11:20 AM


All times are GMT +1. The time now is 02:27 AM.

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"