dan
dan

Reputation: 11

Excel: checking multiple vlookup instances for equality to a cell

I have an excel formula that looks like this in psuedocode:

if vlookup = column name then change value of cell to x ...

I need to make it something like:

if ANY INSTANCE OF vlookup = column name then change value of cell to x

... My code at the moment is : =IF(VLOOKUP(A2,Sheet1!$A$2:$K$362,5,FALSE)=$B$1,"x","")

How can I make it so that it compares multiple instances of vlookup to the string in B1 and not just the first instance? In other words, the A2 value repeats in the range but the value at each index 5 is different. I need to compare those all to the value of B1 independently.

Upvotes: 1

Views: 129

Answers (1)

user4039065
user4039065

Reputation:

Try,

=if(countifs(Sheet1!$A$2:$A$362, A2, Sheet1!$E$2:$E$362, B1), "x", text(,))

Upvotes: 1

Related Questions