Sasha Desansky
Sasha Desansky

Reputation: 71

How to make the "@" symbol work in a formula inside of a macro in VBA?

I have the below macro:

Sub GenerateTestData()
    Range("F3:F151").Formula = "= $B2 & ""."" & $D2 & "@gmail.come""
End Sub

There is an issues with the @ symbol, and I am not sure how to make it work as a string.

Upvotes: 0

Views: 79

Answers (1)

BigBen
BigBen

Reputation: 50007

To close out this question: You have quotes issues:

"= $B2 & ""."" & $D2 & ""@gmail.com"""

Upvotes: 1

Related Questions