I'd like to enter in an equation such as this into a cell:
{=SUM(IF(LEFT(D8:D17,3)="130",E8:E17,0))}
in VBA. There are two issues. First, when I build up a string, I normally can't have quotes "". In php, this is simple, use single quotes instead, such as cell.formula = '{=sum(if(left(".range.address.",3)="130",'.newrange.address. etc.
How do I do that here? Do I escape out of the quotes?
Further, you'll note the curly brackets. I can't just put in curly brackets, right? Do I have to do something else? Maybe the macrorecorder has an answer.
{=SUM(IF(LEFT(D8:D17,3)="130",E8:E17,0))}
in VBA. There are two issues. First, when I build up a string, I normally can't have quotes "". In php, this is simple, use single quotes instead, such as cell.formula = '{=sum(if(left(".range.address.",3)="130",'.newrange.address. etc.
How do I do that here? Do I escape out of the quotes?
Further, you'll note the curly brackets. I can't just put in curly brackets, right? Do I have to do something else? Maybe the macrorecorder has an answer.