Get the column number in formula

Posted by: jars on 8 September 2017, 2:33 pm EST

  • Posted 8 September 2017, 2:33 pm EST


     There is a way(property, method..etc) to get the columns numbers found in a formula?, for example :

    AND(N2>Sheet2!$B$2,N2<=Sheet2!$C$2)   '###Return  the numbers of columns for N, Sheet2:B, Sheet2:C


    COUNTIF(K:K,P2) '#### Return the numbers of columns for K and P


    VLOOKUP(E2,Sheet2!$A$2:$D$6,"4",0)  '### Return the numbers of columns for E, Sheet2: A, Sheet2: D

    And so on...

    Thanks for your help.


  • Replied 8 September 2017, 2:33 pm EST

    You can do what you want to do with the Expression Class, but it isn't easy, we have no sample code and you would need to dig into the Expression Class and learn how to use it. Alternatively, and possibly simpler if you know in advanced what formulas you are trying to parse you could simply get the string representation of the formula from the Formula property, and parse it as you would any string.
  • Replied 8 September 2017, 2:33 pm EST


     How could i get started to discover the Expression Class? I have interest in doing this, could you please guide me on that?


  • Replied 8 September 2017, 2:33 pm EST


    It Represents the abstract class from which all expression types derive. 

      These are the members for FarPoint.CalcEngine.Expression









    You may find more about this in Spread's help file under:

    FarPoint.CalcEngine Assembly > FarPoint.CalcEngine Namespace : Expression Class



Need extra support?

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

Learn More

Forum Channels