Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Setting a formula in macro basic

Morning, Trying to set a formula in a specific cell, but it keeps recognising it as just text...

Using the following code:

sheet.getCellByPosition(4,4).String = date()
sheet.getCellByPosition(4,5).String = InvoiceNum
sheet.getCellByPosition(3,16).String = "=IF(B17="";"";1)"

but it keeps coming up a text, and (obviously) not working. Others work fine, and looking at the Watch results, looks like it should be ok (ie Formula = "=IF(H5="";"";15)".

Anyone? Thanks.