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!

Excel: How Compare Values in 2 Diff. Columns w/Each Other?

Status
Not open for further replies.

kamv

MIS
Jun 14, 2002
22
US
Hi,
I have a spreadsheet in Excel 2000.
I want to find all the rows that do not have a match between the values in 2 different columns.
for example:

column A column B
1 900 900
2 698a 698a
3 B432 791
4 89 89


In row 3 the value in column A does not match the value in column B.
How would I do this? If there is no way to do it in Excel can it be done in Access?
I appreciate your help!

Kamv
 
You can consider conditional formatting, where you can decide how to highlight a cell if the contents of it do not meet the criteria you set.

Take a look at FORMAT->CONDITIONAL FORMATTING
 
I would compose a macro that began with the first value in Column A, compared it to the corresponding value in Column B. If they were equal, I would have the macro set the visible property of the row to False. The macro would need to run until you ran out of values in column A.
 
Cell C1 =IF(A1=B1,"Same","Different")

Fill down to the bottom of the table. You can then use autofilter to detect which rows have same or which rows have different values.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top