VARSUB
WHAT IS VARSUB
VARSUB is a simple custom function for Google Spreadsheets. You can use it to parse simple math equations, while allowing for variable substitution.
It is a simple script. It collects no data, and I charge no money.
FAQ
What is VARSUB?
CJ: Glad you asked! VARSUB is a simple function that you can use in almost all Google Sheet formulas. This function can evaluate simple text math expressions, like “2+2”, “sqrt(2)/2”, etc. The real power of VARSUB comes in its ability to substitute in variables, allowing you to provide a text expression like “2*W+L”, and then provide it a list of variables in text form, like “L=45,W=2”.
Pam Purr
How do you use it? Can you provide an example?
CJ: Yes.
This results in:
Neil Down
Why did you make this?
CJ: I found simple text expression evaluation and variable substitution to be lacking in Google Sheets. I stumbled upon a post on stackoverflow about parsing text expressions in Google Sheets. One of the lowest rated comments (by “Mogsdad”) suggested adapting an existing MIT licensed library, which is what I did.
Mel Odee
Are you charging for this script? Are you selling my data?
CJ: Nope! The script is free, and I am not collecting any data.
Ben Dover
Why did you make this website?
CJ: I couldn’t figure out how to publish this script so that people could get it from the Google Sheets Ad-Ons manager without going through a very convoluted process, involving verifying my site, my brand, “User Data Policy”, etc. Ultimately I made a website so that various things could be verified.
Telly Vision
This website design is a very convoluted way to convey this information.
CJ: I know. It took me an evening to create the script. It took me three evenings of going around in circles trying to figure out how to publish the script. This site only serves as the minimum documentation necessary so that the script can be “verified”.
Mac Aroni
Wait, I have one more question! How can I contact you?
CJ: If you want to drop me a note, you can send me an e-mail to compjinx@compjinx.com. If you are a human, put “THIS IS NOT SPAM” in the title, so that I know that it is not spam. That should trick those bots. Yeah.
Pam Purr
What did you use to make all this?
CJ: The basis for the expression parser is from the following MIT licensed code: github link.
The site is a simple wordpress site.
The fake people were created from thispersondoesnotexist.com.
Mel Odee