Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
double quotes around string in formula craeted in vba
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
double quotes around string in formula craeted in vba
This should do it.
Worksheets(3).Cells(r, x).Value = "=Work!A" & r & " & ""Fri Night""" -----Original Message----- 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 . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
double quotes around string in formula craeted in vba
tegger wrote:
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""" -- Steve Garman |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
double quotes around string in formula craeted in vba
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" -- Regards, Tom Ogilvy "tegger" wrote in message ... 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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
double quotes around string in formula craeted in vba
Thank you. That did the trick.
A very elegant solution if I may say so. DL "Tom Ogilvy" wrote in message ... 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" -- Regards, Tom Ogilvy "tegger" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Line Feed in Formula Adds Double Quotes? | Excel Worksheet Functions | |||
Double Quotes | New Users to Excel | |||
Double Quotes | Excel Discussion (Misc queries) | |||
displaying output of a formula to be in double quotes | Excel Worksheet Functions | |||
"formula is too long" AND test for whether double-quotes are next-to text or number?? | Excel Discussion (Misc queries) |