Here is original article: link.
Now my question:
Using the .formula, I can get very far, but I have a very complicated formula and it doesn't want to work.
The code that works in Excel:
=IF(ISBLANK(G2),"",VLOOKUP("*"&LEFT(G2,9)&"*",'\\compname\path\to\excel\[ramdata.xlsx]20151009'!A:B,2,FALSE))
The code that does not work in Powershell:
$ws.Cells.Item($intRow,9).Formula = '=VLOOKUP("*"$([char]38)LEFT(G$intRow,5)$([char]38)"*",'\\compname\path\to\excel\[ramdata.xlsx]20151009'!A:B,2,FALSE)'
After I run the powershell script, the cell in which I am inserting the formula is blank.
Any ideas?