Of course, you will answer this question with the formula =""
, which will be written in the above cell, but this is not my case.
In fact, I have a function that only works if its argument is equal to an empty cell, that is, a cell that has been completely erased by pressing del
on top of it or such a thing.
Obviously, I canβt just erase the contents of the cell, because it receives data from an external source, and sometimes I need the contents of this cell to be present and visible in my spreadsheet.
The current cell formula is something like
=if([condition], "", [formula])
but if the cell value is ""
and not just empty, the function no longer works (on the contrary, it works fine if the contents are [formula]
).
I cannot change the function, but I can write additional VBA code to achieve the result.
Following Daniel Cooke's request for the publication of my code, here is the formula from QuantLibXL qlFloatingRateBond :
=qlFloatingRateBond(,,"EUR",3,,,"obj_0005#007",2,,"Actual/365",,,"obj_0004#008",,,,,,,)
If you change it to
=qlFloatingRateBond(,,"EUR",3,,,"obj_0005#007",2,,"Actual/365",0,,"obj_0004#008",,,,,,,)
or
=qlFloatingRateBond(,,"EUR",3,,,"obj_0005#007",2,,"Actual/365","",,"obj_0004#008",,,,,,,)
you get an object handler error due to an invalid argument (change regarding the Floors
argument, I hope I didnβt make a mistake with commas and arguments with an empty default value ...).
The only way to force binding without gender is to provide it with a true empty cell, but if you have an external data source that returns some value in this cell depending on the presence or absence of gender, you cannot make it work.