Hi All,
I have an issue that I can't work out....
I am trying to use PowerShell to write an excel formula which contains a variable into a cell.
$batchname = "Batch15c"
$vl = "=VLOOKUP(D2,x:\messaging\$batchname!R1:R300,2,FALSE)"
Using powergui I can see $vl = "=VLOOKUP(D2,x:\messaging\Batch15c!R1:R300,2,FALSE)"
I use this to put the value in a cell - $ws.Cells.Item(2,5).value() = $vl
and when I check the cell I have:-
=VLOOKUP(D2,x:'C:\messaging\[Batch15c]Batch15c'!R1:R300,2,FALSE)
any ideas what I am missing or doing wrong?
TIA
Andy


