Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-21-2012, 07:17 AM
lumpkinbd lumpkinbd is offline VLOOKUP problems Windows XP VLOOKUP problems Office 2007
Novice
VLOOKUP problems
 
Join Date: Mar 2012
Posts: 1
lumpkinbd is on a distinguished road
Default VLOOKUP problems

I am trying to perform a VLOOKUP on a spreadsheet referencing a table array on another spreadsheet. Some, but not all, values are coming up as #NA. There are no invisible or hidden characters, and I checked most of the values, and they are in fact on the table array I am having the VLOOKUP search. I am completely at a loss.

Here is my formula:

=VLOOKUP(M2,'S:\FY 2012 ACTIVITY\FY12 Outstanding 2237s\[Status Tech.xls]Status Tech'!$A$2:$B$903,1)

Like I said, it finds many, but many more are coming back as #NA.

Also, the formatting is the same for all coolumns. They are all formatted for text.

I have included the two spreadasheets I am working from. Someone, please help.



The columns in question are:
(From the March 19 sheet) M and O
(From the status Tech Sheet) A and B

I want the formula to search the staus Tech sheet and return a value into the O column, searching for the M Value. Thanks.

Brian

Edit:

Solved this on my own, thanks.

Last edited by lumpkinbd; 03-21-2012 at 07:55 AM. Reason: Solved Myself.
Reply With Quote
  #2  
Old 03-21-2012, 07:55 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline VLOOKUP problems Windows 7 32bit VLOOKUP problems Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

When you use VLOOKUP you have to find a value in a column and then return the corresponding value from one of the columns to the right of that column. For example, you might want to look up a value in column A and then return the corresponding value from column B.

In this case you want to look up a value in column B and return the corresponding value from column A. ie. a "left lookup". The VLOOKUP() function can't do that.

So you have two choices.

(1) If you want to use VLOOKUP then you'll have to edit the Status Tech file and move the APPROP column to the right of the FCP column. Even though the data in the FCP column is sorted, unless you are 100% sure that there will always be an exact match, I recommend you pass 0 into the range_lookup parameter instead of 1 (you are omitting it at the moment so it is using 1 by default). Using 1 is faster, but it will return a value even if an exact match isn't found - something you might not want. So, if you swap around the APPROP and FCP columns then your formula would be very similar to what you have now:
Code:
=VLOOKUP(M2,'S:\FY 2012 ACTIVITY\FY12 Outstanding 2237s\[Status Tech.xls]Status Tech'!$A$2:$B$903,2,0)
(2) Use a different formula. One way to do a "left lookup" is to use a combination of IINDEX and MATCH. Something like this:
Code:
=INDEX('S:\FY 2012 ACTIVITY\FY12 Outstanding 2237s\[Status Tech.xls]Status Tech'!$A$2:$A$903, 
    MATCH(M2,'S:\FY 2012 ACTIVITY\FY12 Outstanding 2237s\[Status Tech.xls]Status Tech'!$B$2:$B$903,0))
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
something like VLOOKUP hanvyj Excel 4 03-13-2012 09:03 AM
Vlookup ibrahimaa Excel 8 01-03-2012 09:32 PM
VLOOKUP problems Can i do this with a VLookup? foodstudent Excel 1 01-21-2011 12:34 AM
Using IF & VLOOKUP together junction Excel 7 11-18-2010 05:15 AM
Help with VLOOKUP sakhtar Excel 2 07-24-2010 07:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft