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

The Macro Hook
In an Excel Column
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?
I want an Excel Macro.

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


I am Manny

Text in Double Quotes:
"I am Manny"
Don't know how to do it in Excel.
Well this will enable you to place double-quotes in the whole sheet :
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)