Searching and replacing "- "

izhassan

New Member
Joined
Feb 24, 2016
Messages
12
I have a worksheet that contains 900 rows of text data. In the column some of the text starts with a hyphen and space "- ". The others start with a number or alphabets. I am trying to compare this column to another one and find matches between them using IF(ISERROR(MATCH. I followed the thread

http://www.mrexcel.com/forum/excel-questions/923389-=if-iserror-match-question.html

and it helped. But I'm seeing that half of the data that should match is not because of this "- ". Is there somehow I can remove this? Also note that space hyphen space also appears in rows somewhere in the middle of the text. I don't want that to be replaced.
 
I guess I don't understand the context. Can you post the whole IF(ISERROR(MATCH formula you are having difficulty with?

=IF(ISERROR(MATCH(A3,$C$3:$C$117,0)),"","MATCH")

This is what I'm using to match each entry in row A to the entire Column C, find the match and return "MATCH" in column B. Column C has 114 entries and column A has 897. So essentially column B should return 114 matches, but what I'm getting is 63 Matches. The data is still present though, I've checked manually.

and thank you Radian89, Your formula works as well.
 
Upvote 0
Have you checked data in column C for trailing / leading spaces? Also check for other non-printable characters such as CHAR(10) and CHAR(160). They are difficult to detect without formula.
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top