Macro to place quotation marks before and after text in all cells
Here is a macro to try. Select the range on your worksheet that needs quoted
text.
Sub TextQuotes()
' Quotes around text
' First select the range to put quotes around
'
Dim c As Range
For Each c In Selection
c = """" & c.Value & """"
Next
End Sub
Sub RemoveTextQuotes()
' Removes quotes around text
' First select the range to remove quoted text
'
Dim c As Range
For Each c In Selection
If Left(c.Value, 1) = """" And Right(c.Value, 1) = """" Then
c.Formula = Mid(c.Value, 2, Len(c.Value) - 2)
End If
Next
End Sub
"suestew" wrote:
It seems really simple. I tried to do a simple find and replace using * as a
wildcard, but it didn't work. All I need to do is get quotation marks before
and after the text in each cell of each row. I know there is a simple
solution out there. Any help would be greatly appreciated.
|