mdmlll
mdmlll

Reputation: 31

Vba search method for multiple fields

I have two tabs with about 3000 rows, each row has a primary key. I want to search by primary key from one tab to another and make sure all the fields match.(Each primary key has its own price,quantity,type......) What is the easiest approach? I don't want to loop through each fields since there are 10 fields that I need to compare, loops be relatively slow.

Upvotes: 0

Views: 141

Answers (1)

GCSDC
GCSDC

Reputation: 3530

You may do it using built-in excel functions.

On both sheets, for each row, you may join all field content's on a new column using CONCATENATE function (or & operator).

Then use VLOOKUP or COUNTIFS functions for matching entries between sheets using the primary key and the contents of this new column.

Upvotes: 1

Related Questions