Thing. I need VBA code to insert double quotes around rows in each cell in excel range

I am familiar with VB.NET, but VBA in excel alerted me. With my best attempt, I get the "Type of mismatch" error:

Sub AddQuotes()

    For Each x In Range("List").Cells
    x.Text = "*" * " & x.text & " & "*"
    Next

End Sub
+3
source share
1 answer

Try using chr (34) for the double quote character

e.g. chr (34) and x.text and chr (34)

+10
source

Source: https://habr.com/ru/post/1745876/


All Articles