ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Comparing text fields (https://www.excelbanter.com/excel-worksheet-functions/28083-comparing-text-fields.html)

[email protected]

Comparing text fields
 
I have in an excel spreadsheet two columns of texts not numbers.
I would like to compare row 1 column a with row 1 column b
and return an exception if the two text fields do not match .
I have approx 10,000 rows , so you can see my problem .
Any help is deeply appreciated .

Regards Mason


Max

One way ..

Put in C1: =TRIM(A1)=TRIM(B1)
Copy down to C10000

Col C will return FALSE for exceptions, TRUE otherwise

You could then do a Data Filter Autofilter on col C thereafter (insert a
new row1 first, and enter a label in C1) to filter out FALSE

TRIM will improve robustness of the comparison via removing any extraneous
leading, trailing or in-between spaces which may be present (but not readily
visible) in the text in cols A and B

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
wrote in message
oups.com...
I have in an excel spreadsheet two columns of texts not numbers.
I would like to compare row 1 column a with row 1 column b
and return an exception if the two text fields do not match .
I have approx 10,000 rows , so you can see my problem .
Any help is deeply appreciated .

Regards Mason




[email protected]

Thanks Max that worked like a charm. I appreciate your help .

Regards Mason


Max

You're welcome !
Thanks for the feedback
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
wrote in message
oups.com...
Thanks Max that worked like a charm. I appreciate your help .

Regards Mason





All times are GMT +1. The time now is 06:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com