ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Insert Quatation Mark " (https://www.excelbanter.com/excel-programming/336971-insert-quatation-mark.html)

gloriel7

Insert Quatation Mark "
 

How can i insert quotation mark ( " or "" )
in each cell. any macro?
i.e.
A-WALL becomes "A-WALL"
A-COLUMN becomes "A-COLUMN" :(


--
gloriel7
------------------------------------------------------------------------
gloriel7's Profile: http://www.excelforum.com/member.php...o&userid=16379
View this thread: http://www.excelforum.com/showthread...hreadid=394779


Geeves[_3_]

Insert Quatation Mark "
 
try something like
Dim start As String
Dim newName As String
Dim label As String

Dim i As Integer


For i = 1 To 10

With Worksheets("trial")
start = .Range("a1").Offset(i, 0)
label = """"
newName = start
Range("a1").Offset(i, 0) = label & start & label

End With

Next i

"gloriel7" wrote in
message ...

How can i insert quotation mark ( " or "" )
in each cell. any macro?
i.e.
A-WALL becomes "A-WALL"
A-COLUMN becomes "A-COLUMN" :(


--
gloriel7
------------------------------------------------------------------------
gloriel7's Profile:
http://www.excelforum.com/member.php...o&userid=16379
View this thread: http://www.excelforum.com/showthread...hreadid=394779




David Adamson[_4_]

Insert Quatation Mark "
 
Sorry didn't check what I posted until I got to work you can get rid of that
newName bit as it does nothing

----------------
Dim start As String
Dim label As String
Dim i As Integer

For i = 1 To 10 ' change this bit on where you want the change to occur
(i.e define your range to your needs)

With Worksheets("trial")
start = .Range("a1").Offset(i, 0)
label = """"
Range("a1").Offset(i, 0) = label & start & label
End With

Next i

--------------------------




All times are GMT +1. The time now is 12:29 PM.

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