Skip to content

variables are treated differently than cells - why? and any workarounds? #55

@makarandp0

Description

@makarandp0

Firstly Thank you for all your contributions - Its amazing utility !

I am trying to use this in our workflow but have found an issue:

Lets say Cell A1 has value "1"

SUM("1", "1") === 2
SUM(A1, A1) === 2
but
SUM(var1, var1) === 0 where var1 resolve to A1

This is because code treat literals different from variable references.
https://github.com/LesterLyu/fast-formula-parser/blob/master/formulas/functions/math.js#L599

Is there any way to be able to use variables but let them be treated similar to literals or cell references?

Thank you for all your contributions !
Makarand

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions