ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   leading or trailing quotes (https://www.excelbanter.com/excel-programming/295112-leading-trailing-quotes.html)

Clint[_3_]

leading or trailing quotes
 
Hi,

I have a problem with doing a mail merge in Word with the excel file
as a data source. In my excel file, there is a column (TextColumn)
contains text value in each cell on all rows. What happen was during
the mail merge in Word, if the first word or the last word of the cell
value is in quotes (single or double), the leading or trailing quotes
are strip off. for example, if a cell value is "This" is "a" "test".,
during the mail merge, it will look like This" is "a" "test. However,
if I add an extra quote in front of that word, I can get the text
comes out correct, which means I have to do this: ""This" is "a"
"test"". I can't just do a Find and ReplaceAll because some other
text in the middle might have quotes.

I want to know if it's possible to create a macro in the excel file to
find the leading and trailing quotes of each row on that column and
add an extra quote in it.

Thanks in advance.

Clint

BrianB

leading or trailing quotes
 
I got this to work by making a new column with the formula :-
="""" &A1

ie. (4 quotes) &A1

You can then do Copy & Edit/Paste Special/Values and remove th
original column

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 10:40 PM.

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