=VLOOKUP(Lookup Value,Table Arrey,col index number,0)
Lookup Value = is the value to be found in the first column of the table (Data field which is to be compared)
Table arrey = is table which contains data which is to be compared
Col Index number = column number of the table which is compared to query (if value is in column c then enter 3, if it is in column d then enter 4, etc)
Formula should be used in primary sheet with which data to be compared