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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compare two columns for same amounts

Status
Not open for further replies.

jasonhuibers

Programmer
Sep 12, 2005
290
CA
I have two excel columns in one work book. There are a list of accounts in ColumnA and a list of accounts in ColumnC. I need to identify which account # in Column A exist in Column B as well...

How can I do this using VBA?
 
You can do this without VBA using the MATCH() function.

In the simplest form:

In this example consider that you have 100 rows, 1 through 100.

In any empty column, row 1 enter

=MATCH(A1,B$1:B$100)

Copy that down 100 rows

Any row with a number and not an "N/A" has a match.
 
Column A | Column B
1 3
3 4
8 6


The function should return 3 as 3 can be found in both columns...
 
The Match fm returns the relative offset in the lookup range. That is all U need.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top