I am after a formula to match a number of columns between two worksheets and return the last reference worksheets final column data. I know this is doable in VBA, but am looking for a formula method.
MainWorksheet:
User | Region | Country | City | Lookup
--------------------------------------------------
User1 | Europe | Italy | Rome | [formula here]
User2 | Americas | Brazil | Rio | [formula here]
ReferenceWorksheet:
Region | Country | City | Data
-----------------------------------
Europe | England | London | some data
Americas | Brazil | Rio | more data
Europe | Italy | Rome | some more data
The formula I am after should match each column in that particular row and add the Data cell value from the ReferenceWorksheet to the MainWorksheet.
eg. If (MainWorksheet.Region = ReferenceWorksheet.Region) &&
(MainWorksheet.Country == ReferenceWorksheet.Country) &&
(MainWorksheet.Region == ReferenceWorksheet.Region) Then
MainWorksheet.Column E = ReferenceWorksheet.Current Row:Data Column
I haven't found a cleancut way to do this using mutliple columns using VLOOKUP, INDEX(MATCH)) etc. Is there a way to filter within a function?
Any help is much appreciated!
See Question&Answers more detail:os