## 如何在Excel公式中创建包含双引号的字符串？内容来源于 Stack Overflow，并遵循CC BY-SA 3.0许可协议进行翻译与使用

• 回答 (10)
• 关注 (0)
• 查看 (108)

Maurice "The Rocket" Richard

### 10 个回答

`= "Maurice ""The Rocket"" Richard"`

`="Maurice "&"""TheRocker"""&" Richard"`

VBA 函数

1)。公式=“=”“THEFORMULAFFITION”&(CHAR(34)&“Matters”&Char(34))“

2)。公式=“THEFORMULAFION”

` THEFORMULAFUNCTION "STUFF"`

` THEFORMULAFUNCTION "STUFF"`

EXCEL公式

1)=“THEFORMULAFFION”&(CHAR(34)&“Matters”&Char(34))

2) THEFORMULAFUNCTION "STUFF"

```'formula to insert into C1 - =IF(A1<>"", B1, "")
range("C1").formula = "=IF(A1<>"""", B1, """")"         '<~quote chars doubled up
range("C1").formula = "=IF(A1<>TEXT(,), B1, TEXT(,))"   '<~with TEXT(,) instead```

```'formula to insert into D1 - =IFERROR(VLOOKUP(A1, B:C, 2, FALSE)&"", "")
range("D1").formula = "=IFERROR(VLOOKUP(A1, B:C, 2, FALSE)&"""", """")"
range("D1").formula = "=IFERROR(VLOOKUP(A1, B:C, 2, FALSE)&TEXT(,), TEXT(,))"```

`=CONCATENATE("'{""service"": { ""field"": "&A2&"}}'")`

```Function Quote(inputText As String) As String
Quote = Chr(34) & inputText & Chr(34)
End Function```

`="Maurice "&Quote("Rocket")&" Richard"`

`=CONCATENATE("""x"""," hi")  `

= "x" hi

`= "Maurice " & CHAR(34) & "Rocket" & CHAR(34) & " Richard"`