Excel/VLookup on Multiple sheets, returning adjacent cell on same matched row
my workbook contains 2 sheets:
Column A = Object name
Column AC = Matched objects
Column AD = ?
Column A = Object name
Column Z = Module Type
I have matched the like object names in column AC on Sheet 1 using =IF(ISNA(VLOOKUP(TRIM(A2),'Sheet2'!$A:$A,1,FALSE)),"not in Tranches 1, 2, 3 or 4","Match")
For the "matches" I now need to also bring back the module associated with the matched object and put that value into column AD in Sheet 1. (I need to put all the data on Sheet 1 because Sheet 1 also has more information that is needed for my task.)
How do i bring back information for the matches in column AD on Sheet 1?
If I understand your question correctly, if a match is found in the lookup you would like to then essentially repeat the lookup returning the value in column Z of the same row. It is also desirable to do this without the inefficiency of repeating the lookup in order to get the value in column Z.
One way to do this is to use MATCH to do the lookup rather than VLOOKUP. MATCH returns the row that the match occurs in, so it can be used with the INDEX function to directly get the desired value in that row. This also enables one to look up multiple items, and even to return items from adjacent cells or rows, without having to repeat the lookup.
In your case the way this would work would be to pick another column in Sheet1 to do the MATCH in--you could even hide this column. You could use this formula:
This will give the row number where the match is found, or #N/A if no match. Let's just say for example that this column is AE. Now the formula you currently have could be simplified to:
=IF(ISNA(AE2),"not in Tranches 1, 2, 3 or 4","Match")
and the formula in AD for the associated module would be:
Using the row number from AE2 to get the value from that row in column Z.
Feel free to follow up if I have misinterpreted your question in any way.
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here