[SOLVED] Need to find apostrophe not preceded by backslash

HowdeeDoodee

Well-known Member
Joined
Nov 15, 2004
Messages
592
I have a column of text where some apostrophes are not preceded by a backslash. I have a find and replace macro for these cells which are too long for excel's find and replace but the macro sometimes misses apostrophes in the cells. Can someone come up with a way to search down through the column to find apostrophes not preceded by the \ backslash charater. Thank you in advance for any replies.
 

Some videos you may like

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

HowdeeDoodee

Well-known Member
Joined
Nov 15, 2004
Messages
592
I have solved this issue. Here is what I did.

I filtered the column by all those rows containing just an apostrophe.
I then filtered the column by all those rows not containing a backslash apostrophe.
What is left is just the rows containing only an apostrophe.
In an empty column next to the filtered column of text I entered the word "check" and filled down.
I then turned the filter off.
I then sorted the column with "check" in the column so all the rows with just an apostrophe were at the top of the sheet.
I then copied and pasted the cells containing only an apostrophe into wordpad.
Replaced every apostrophe with \', then replaced every \\' with \' so no double backslashes would appear.
 

HowdeeDoodee

Well-known Member
Joined
Nov 15, 2004
Messages
592
PLEASE NOTE!!!!!

This procedure works only if your length of text string in the cells does not exceed 255. If your text string is longer than 255, please see the following thread for samples of formulas you can use.

In one column use the formula to find the character without a backslash
In the next column use the formula to find the character with a backslash.
Compare colunms.
If value in one column does not equal value in other column then you have a character without a backslash.

http://www.mrexcel.com/board2/viewtopic.php?p=974102#974102
 

Watch MrExcel Video

Forum statistics

Threads
1,095,267
Messages
5,443,434
Members
405,235
Latest member
1Thess521

This Week's Hot Topics

Top