georgej
georgej

Reputation: 3311

How To Do Vlookup With Conditional

I am doing a Vlookup on and ads report. I have the following table:

NAME        DELIVERY
AD_NAME_1   inactive
AD_NAME_2   inactive
AD_NAME_3   inactive
AD_NAME_1   active
AD_NAME_1   archived

I want to do a vlookup by NAME and if any ad with that NAME is "active" I would like to display that. Otherwise, I want to display that it is "inactive". How would I do this?

In this example the result would be:

AD_NAME_1 is "active
AD_NAME_2 is "inactive"
AD_NAME_3 is "inactive"

Upvotes: 0

Views: 16

Answers (1)

player0
player0

Reputation: 1

=ARRAYFORMULA(UNIQUE(IFERROR(VLOOKUP(SORT(A1:A), SORT(A1:B, 1, 1, 2, 1), {1, 2}, 0))))

0

Upvotes: 1

Related Questions