[SOLVED] Need to find apostrophe not preceded by backslash

HowdeeDoodee

Well-known Member
Joined
Nov 15, 2004
Messages
599
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.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,254
Members
448,556
Latest member
peterhess2002

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