Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need To Add Quotes Before and After the Text In a Column
#1
I need to add Quotes(") before and after the Text in a Column. How would write a Macro for this.
#2
in an Excel column or a flat file column?
A new blog on QM coding and automation.

The Macro Hook
#3
In an Excel Column
#4
Do you want to write Quick Macros macro or Excel macro?

Do you want to specify a column letter and enclose text of every cell in the column?
#5
I want an Excel Macro.

I want to enclose all the Text in the Cells with Double Quotes, for a given Column.

Example:

Text:
-----
I am Manny

Text in Double Quotes:
------------------------
"I am Manny"
#6
Don't know how to do it in Excel.
#7
Well this will enable you to place double-quotes in the whole sheet :
Code:
Copy      Help
Private Sub Worksheet_Change(ByVal Target As Range)
    If InStr(Target.Value, """") = 0 Then
       Target.Value = """" & Target.Value & """"
    End If
End Sub

You can always refine it more as per your requirement.


Forum Jump:


Users browsing this thread: 1 Guest(s)