Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding equal cells in 2 columns

Status
Not open for further replies.

gunrajd

IS-IT--Management
Jun 8, 2007
1
US
I want to look at the cells in two columns. Find in both where one cell in one column is the exact value of a cell in another. I want to then have these columns lined up and then have the equal cells found aligned first in decending order. Exactly as follows:

Column A's entries line up with Column B if they have the same value, The entries found in Column A without an equal value in B align to a blank space.

Assumptions: All of B will be in A. A may not match always, therefore A will be longer than B and the non matches in A will align with a blank in B because once B is matched the rest is empty, owing to the fact that B is a subset of A.

Example:

Column A | Column B
1 1
2 3
3 5
4
5


End result

Colu

Column A | Column B
1 1
2
3 3
4
5 5
 
1. sort column a
2. fill column c with the following formula (where n is the last row in colunm B):

Code:
=if(isna(vlookup(A1, $B$1:$B$n, 1, FALSE)), "", vlookup(A1, $B$1:$B$n, 1, FALSE))


mr s. <;)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top