Home » Questions » Computers [ Ask a new question ]

How to find value in another column in the same row of excel?

How to find value in another column in the same row of excel?

My excel data has 2 columns. Data in my worksheet is like below.

Asked by: Guest | Views: 62
Total answers/comments: 1
Guest [Entry]

"I think what you want in B2 (and copied below) is:

IF(
ISNA(
MATCH(A2, A$1:A1, 0)
),
"""",
VLOOKUP(A2, A$1:B1, 2, FALSE)
)

If there's no previous match with A2, MATCH will return #NA, so ISNA will return TRUE, so the IF will yield the first value, """", or nothing.

If there is a previous match, MATCH will not return #NA, so ISNA will return FALSE, so the IF will yield the result of the VLOOKUP. VLOOKUP will find the row whose A value exactly matches A2 and return the value in the second column."