Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need to you quotations ("") in a string.
I have a formula that requires quotations around the X in the formula but VBA
will not allow me to do it. Is there a way around this because I have to have the quotations around the X in the formula bar for the formula to work. Sub InsertFormula() Const Depts As String = "Engineering" With Sheets("Summary") .Range("D34").Formula = "=SUMPRODUCT(--(" & Depts & "Dates<=$J$4),--(" & Depts & "Indicators="X")," & Depts & "Hours)*(1+$J$10)" End With End Sub -- Cheers, Ryan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need to you quotations ("") in a string.
Double up the quotes...
With Sheets("Summary") .Range("D34").Formula = "=SUMPRODUCT(--(" & Depts & "Dates<=$J$4),--(" & Depts & "Indicators=""X"")," & Depts & "Hours)*(1+$J$10)" End With -- HTH... Jim Thomlinson "RyanH" wrote: I have a formula that requires quotations around the X in the formula but VBA will not allow me to do it. Is there a way around this because I have to have the quotations around the X in the formula bar for the formula to work. Sub InsertFormula() Const Depts As String = "Engineering" With Sheets("Summary") .Range("D34").Formula = "=SUMPRODUCT(--(" & Depts & "Dates<=$J$4),--(" & Depts & "Indicators="X")," & Depts & "Hours)*(1+$J$10)" End With End Sub -- Cheers, Ryan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
=SUBSTITUTE(C4,"~?#","") will this work to remove multiple string | Excel Worksheet Functions | |||
Converting "uppercase" string data to "lower case" in CSV file | Excel Discussion (Misc queries) | |||
text string: "91E10" in csv file auto converts to: "9.10E+11" | Excel Discussion (Misc queries) | |||
Converting string "061123" into a date "23/11/06" | Excel Programming | |||
Making "examp le" become "examp_le" in a string | Excel Programming |