Reputation: 93
I have two worksheets: Contacts and Payments.
In the Contacts worksheet:
Column A lists the ID (number) of each contact.
Column D has the first name of each contact.
In the Payments worksheet:
Column C lists the ID (number) of each contact who made a payment.
This worksheet doesn't include the person's first name, which is what I need. I need to see the first name of each contact who made a payment.
In Column A (new column) in Payments, I want to return the first name of the contact who made a payment.
Essentially, I need Column C in Payments to match Column A in Contacts and return the value of Column D in Contacts to Column A in Payments. Confusing.
Upvotes: 0
Views: 2071
Reputation: 230
=IF(COUNTIF(C:C,A1)>0,VLOOKUP(A1,C:C,1),"")
Supposed, criteria in A1 and the lookup range is the whole column C.
EDIT: this should work instead of the above
=IFERROR(INDEX(Contacts!$D$1:$D$4,MATCH(Payments!C1,Contacts!$A$1:$A$4,0)),"")
Upvotes: 1