Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
dandigger
 
Posts: n/a
Default vlookup returning #NA

I've tried searching, I've used contextures.com but couldn't find the right
help.
I have an extremely large table: A2:C49918
Column A = Zip Codes Column B = State Column C = County
What I want is the state and county to pull when someone enters a zip in
field G6 of a different sheet. my formula for state is as follows:
=vlookup(G6,'Zip Code Lookup'!$A$2:$C$49918,2) and I am getting the
infamous #NA as a returned result after I enter a valid value into G6. any
suggestions. once I get this formula to work, I can use it to pull the county
as well.
and yes, I have formatted the values to 'Numbers' rather than 'Text'
Thanks in advance
  #2   Report Post  
Fredrik Wahlgren
 
Posts: n/a
Default


"dandigger" wrote in message
...
I've tried searching, I've used contextures.com but couldn't find the

right
help.
I have an extremely large table: A2:C49918
Column A = Zip Codes Column B = State Column C = County
What I want is the state and county to pull when someone enters a zip in
field G6 of a different sheet. my formula for state is as follows:
=vlookup(G6,'Zip Code Lookup'!$A$2:$C$49918,2) and I am getting the
infamous #NA as a returned result after I enter a valid value into G6. any
suggestions. once I get this formula to work, I can use it to pull the

county
as well.
and yes, I have formatted the values to 'Numbers' rather than 'Text'
Thanks in advance


If G6 is in a different sheet, you need something like this
=vlookup(SheetInQuestion!G6,'Zip Code Lookup'!$A$2:$C$49918,2)

/Fredrik


  #3   Report Post  
dandigger
 
Posts: n/a
Default

I'm sorry, I should have clarified: the vlookup formula is going in H6,
directly next to the G6 on the same page. the table is on a different page:
'Zip Code Lookup'
  #4   Report Post  
Fredrik Wahlgren
 
Posts: n/a
Default


"dandigger" wrote in message
...
I'm sorry, I should have clarified: the vlookup formula is going in H6,
directly next to the G6 on the same page. the table is on a different

page:
'Zip Code Lookup'


Is 'Zip Code Lookup' a named range that refers to the correct range. Are you
sure it refers to the range in the correct worksheet? I assume that's page
means. Unfortunately, I haven't used VLOOKUP veryoften.

/Fredrik


  #5   Report Post  
ww
 
Posts: n/a
Default

Did you try using the false identifier? If the zip codes aren't in numerical
order I'm not sure if it would find it. Try
=vlookup(G6,'Zip Code Lookup'!$A$2:$C$49918,2,false)
see if that works.

"dandigger" wrote:

I've tried searching, I've used contextures.com but couldn't find the right
help.
I have an extremely large table: A2:C49918
Column A = Zip Codes Column B = State Column C = County
What I want is the state and county to pull when someone enters a zip in
field G6 of a different sheet. my formula for state is as follows:
=vlookup(G6,'Zip Code Lookup'!$A$2:$C$49918,2) and I am getting the
infamous #NA as a returned result after I enter a valid value into G6. any
suggestions. once I get this formula to work, I can use it to pull the county
as well.
and yes, I have formatted the values to 'Numbers' rather than 'Text'
Thanks in advance



  #6   Report Post  
dandigger
 
Posts: n/a
Default

does the vlookup have to be on the same page as the table?
  #7   Report Post  
ww
 
Posts: n/a
Default

No. Vlookup can pull information from a completely seperate file if you want
it to.

"dandigger" wrote:

does the vlookup have to be on the same page as the table?

  #8   Report Post  
CLR
 
Posts: n/a
Default

No, but if not, you must refer to the SheetName as part of the Range in the
formula......better/easier IMHO to give a RangeName to the table.........(
Insert Name Define..... ).........then use a formula such as something
like this:

=VLOOKUP(G6,MYTABLE,2,FALSE)

Vaya con Dios,
Chuck, CABGx3




"dandigger" wrote in message
...
does the vlookup have to be on the same page as the table?



  #9   Report Post  
ww
 
Posts: n/a
Default

Did you rename sheet2 to be Zip Code Lookup?

"dandigger" wrote:

does the vlookup have to be on the same page as the table?

  #10   Report Post  
dandigger
 
Posts: n/a
Default

I GOT IT!!!

I formatted G6 (entry field) as Text, and all the zip codes as General. For
some reason, that worked and the formula is now giving me the state for the
zip code entered.
Thanks for all the help guys!! weird


  #11   Report Post  
Dave Peterson
 
Posts: n/a
Default

It's more than formatting.

The values in the cells have to match.

If you have a cell formatted as General and type 12345 in that cell, then later
format the cell as text, the value in that cell will still be a number (until
you edit that cell).

If your lookup table has its key values as text, you can use:
=vlookup(text(g6,"00000"),.....

To match text with text.

If your lookup table has its key values as numbers, you can use:
=vlookup(--g6,....)

the -- converts the text value to numbers.

=======
Personally, I'd choose a format (number or text) and make sure my data matched
in both spots.

If you want to convert those text numbers to numeric numbers (huh?), you can do
this:

Copy an empty cell.
select your column
edit|paste special|check Add

or

Select your column
data|text to columns|finish.


dandigger wrote:

I've tried searching, I've used contextures.com but couldn't find the right
help.
I have an extremely large table: A2:C49918
Column A = Zip Codes Column B = State Column C = County
What I want is the state and county to pull when someone enters a zip in
field G6 of a different sheet. my formula for state is as follows:
=vlookup(G6,'Zip Code Lookup'!$A$2:$C$49918,2) and I am getting the
infamous #NA as a returned result after I enter a valid value into G6. any
suggestions. once I get this formula to work, I can use it to pull the county
as well.
and yes, I have formatted the values to 'Numbers' rather than 'Text'
Thanks in advance


--

Dave Peterson
  #12   Report Post  
Dave Peterson
 
Posts: n/a
Default

Oops. Didn't see your post that you found a solution.

dandigger wrote:

I GOT IT!!!

I formatted G6 (entry field) as Text, and all the zip codes as General. For
some reason, that worked and the formula is now giving me the state for the
zip code entered.
Thanks for all the help guys!! weird


--

Dave Peterson
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 not returning results Chris Kellock Excel Worksheet Functions 14 March 19th 08 08:30 AM
Vlookup returning #N/A ww Excel Worksheet Functions 2 March 23rd 05 12:24 AM
vlookup and filename returning same result on each sheet. RogueSwan Excel Discussion (Misc queries) 3 March 22nd 05 10:08 PM
MY VLOOKUP IS RETURNING N/A AND THEREFORE MY TOTAL SUM AT THE BOT. Martin Excel Discussion (Misc queries) 2 December 13th 04 11:21 AM
troubleshoot vlookup returning #N/A dillon Excel Worksheet Functions 1 December 2nd 04 03:32 PM


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