Changing Value of cell with Formula

Posted by: edstaffin-fp on 8 September 2017, 4:48 am EST

  • Posted 8 September 2017, 4:48 am EST

    Hi,

    Suppose I set a formula on .Cell(0,2).Formula = "A1+B1". Also, suppose I have .Cell(0,0).value = 10 and .cell(0,1).value=20.

    In this case .Cell(0,2) will have 30 as a value.

    Now suppose the user types in a number into .Cell(0,2) ... 50 for example. The next time the sheet is recalced it's set back to 20.

    How can I make the 50 sticky?

    Thanks ... Ed

     

  • Posted 8 September 2017, 4:48 am EST

    Hello Ed,

    Please verify the AutoCalculation property is set to True. Though it's default values is True. In case it is set to some other value, same can be done as follows:

    FpSpread1_Sheet1.AutoCalculation = True

    Thanks

  • Posted 8 September 2017, 4:48 am EST

    Ed,

    Make sure you have the lastest version.

    In some earlier versions of the spreadsheet, I think user entry of a cell value overwrote the existing cell value but kept any existing cell formula.  The next recalculate would then overwrite the user entry with the formula result.  To remove the formula, the user had to entry a blank formula (i.e. "=").

    In current versions of the spreadsheet, user entry of a cell value overwrites the existing cell value and clears any existing cell formula.

  • Posted 7 August 2018, 5:03 am EST

    I am on 9.35.20153.0

    If I have AllowUserFormulas then they can remove formulas and add text.

    Otherwise, they can not remove a formula and replace with text.

    I do not want formulas added. Is this issue fixed in a newer release? I do not currently have maintenance.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels