Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel - return "true" if a value exists in both columns

I have two columns of data. column A and column B. in the third column (C) I want to type a formula that will return "true" if a data in column B exists anywhere in column A. Just this :) Thank you in advance.

like image 738
Billef32 Avatar asked Aug 10 '13 16:08

Billef32


People also ask

How do you match two columns in Excel and return a value?

In the Formula Type drop down list, please select Lookup option; Then, select Look for a value in list option in the Choose a formula list box; And then, in the Arguments input text boxes, select the data range, criteria cell and column you want to return matched value from separately.

How do you check if a value appears twice in one column?

Select the data you want to check for duplicates. This can be a column, a row or a range of cells. On the Home tab, in the Styles group, click Conditional Formatting > Highlight Cells Rules > Duplicate Values…


1 Answers

Try This:

=NOT(ISNA(VLOOKUP(B1,A:A,1,0)))

Assuming you are starting in cell C1.

VLOOKUP returns the value of B1 in the column A, or #N/A if it's not found. ISNA will return TRUE if no value is found, or FALSE if it is, finally NOT negates the result such that it will return TRUE if value is found and FALSE otherwise.

like image 133
Firefly Avatar answered Oct 31 '22 00:10

Firefly