I have two spreadsheets, i want to perform a lookup to populate a column in spreadsheet A, from data in spreadsheet B in VBA.
However the data in spreadsheet B may contain mulitple matches for the lookup field, in which case i just want to return a string "Multiple Records".
I could probably achieve this by creating a pivot table and first lookup record counts to mark mulitiple matches then run a normal lookup for records with only one match.
But is there a better way?
Also is there a better way to lookup in VBA than calling the Vlookup worksheet function?
And how about returning severall columns of data for a match, i may need to call more data for B to A, but i dont want vlookups in several columns.
However the data in spreadsheet B may contain mulitple matches for the lookup field, in which case i just want to return a string "Multiple Records".
I could probably achieve this by creating a pivot table and first lookup record counts to mark mulitiple matches then run a normal lookup for records with only one match.
But is there a better way?
Also is there a better way to lookup in VBA than calling the Vlookup worksheet function?
And how about returning severall columns of data for a match, i may need to call more data for B to A, but i dont want vlookups in several columns.