Filtering information if Columns B and C match the information in Column A

Copper Contributor

We have several contacts within a company and only 1 primary contact for that company. How do I pull records if the Primary Contact name matches the Firstname and Lastname columns? For example, Joe smith in Primary Contact column matches First Name (Joe) and Last Name (Smith) and it would only pull the one row for Joe. Below is my example:

 

ComparyPrimary ContactFirst Name Last Name
ABCJoe SmithAnnFull
ABCJoe SmithKarenTest
ABCJoe SmithJoeSmith
ABCJoe SmithJimAlbert
XYZAndy PowerAndyPower
XYZAndy PowerSueAndrew
10 Replies

@Ttaylor1114 

You can use FILTER to do this:

=LET(
    check, Sample[First Name] & " " & Sample[Last Name] = Sample[Primary Contact],
    FILTER(Sample, check)
)

 

 

Patrick2788_0-1722967257904.png

 

What you show is exactly what I want to pull. I am getting an error message when I try the LET, though.

How does it work if I pull the information from a tab that says MEMBERS in a new tab called PRIMARY? I'd like to pull all the information in the row - email, address, etc. from the MEMBERS tab.

Which version of Excel are you using?
The version is good. What error were you getting with LET?
Just that there is a problem with this formula. I just copied and pasted exactly what you had in the example you sent.
I think I'm doing something wrong. When I add a new company to your example or change a name of one of the companies, it still produces the same results. My ultimate goal is to pull the entire row of information in a new worksheet if First Name and Last Name match what is in Primary Contact.
Compary Primary Contact First Name Last Name
ABC Joe Smith Ann Full
ABC Joe Smith Karen Test
ABC Joe Smith Joe Smith
ABC Joe Smith Jim Albert
XYZ Andy Power Andy Power
XYZ Andy Power Sue Andrew

@Ttaylor1114 

The formula uses structured references:

=LET(
check, Sample[First Name] & " " & Sample[Last Name] = Sample[Primary Contact],
FILTER(Sample, check)
)

 

Sample is the name of the table.  To refer to a column in a table, the syntax is TableName[Name of Column].

 

If you don't have a table in your sheet, you can use explicit references to the ranges (e.g. A2:A10).

 

This is what the formula looks like without a table:

=LET(
    check, Sheet1!$G$2:$G$7 & " " & Sheet1!$H$2:$H$7 =
        Sheet1!$F$2:$F$7,
    FILTER(Sheet1!$E$2:$H$7, check)
)
Thank you so much! Worked perfectly!!
Glad it's working. You're welcome!