Have a formula reference the cell that it is in

Posted by: kbj on 9 February 2018, 10:28 am EST

    • Post Options:
    • Link

    Posted 9 February 2018, 10:28 am EST

    I have a custom formula that needs to reference the cell it is in as in:

    formula=“customFormula(RC)” (or R[0]C[0]) For some reason the control will not pass this argument to the Evaluate function. Is there a way to get around this?

    Thanks,

    Kingman

  • Posted 9 February 2018, 11:47 am EST

    A simple workaround occurred .1 nanosecond after I posted this

    customFormula(ROW(),COLUMN())

    -Kingman

  • Posted 12 February 2018, 3:09 am EST

    Hello,

    You can also use the ActiveRow and and ActiveColumn properties. Similar to:

    
    FarPoint.Win.Spread.Column c; 
    FarPoint.Win.Spread.Row r;
    fpSpread1.ActiveSheet.SetActiveCell(2, 2);
    c = fpSpread1.ActiveSheet.ActiveColumn;
    r = fpSpread1.ActiveSheet.ActiveRow;
    label1.Text = "The active column is " + fpSpread1.ActiveSheet.ActiveColumn.ToString(c) + " and the active row is " + fpSpread1.ActiveSheet.ActiveRow.ToString(r);
    
    

    Thanks,

    Deepak Sharma

Need extra support?

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

Learn More

Forum Channels