double quotes around string in formula craeted in vba

  • Thread starter Thread starter tegger
  • Start date Start date
T

tegger

I'm trying to enter this formula:

=Work!A4&"Fri Night"



with this line of code:

Worksheets(3).Cells(r, x).Value = "=Work!A" & r & "Fri Night"



I can't see how to get the double quotes around the Fri Night.



If anyone can help, I'd be most grateful,

DL
 
tegger said:
I'm trying to enter this formula:

=Work!A4&"Fri Night"



with this line of code:

Worksheets(3).Cells(r, x).Value = "=Work!A" & r & "Fri Night"

Worksheets(1).Cells(r, x).Value = """=Work!A""" & r & """Fri Night"""
 
sStr = "=Work!A" & r & "&" & chr(34) & "Fri Night" & chr(34)
worksheets(3).Cells(r,x).Value = sStr


testing in the immediate window:

r = 4
? "=Work!A" & r & "&" & chr(34) & "Fri Night" & chr(34)
=Work!A4&"Fri Night"
 
Back
Top