View Single Post
 
Old 03-21-2012, 07:55 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Windows 7 32bit 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