This project is a VBA Math Interpreter, made without any external dependencies.
It supports basic operations, float numbers, negative numbers, operation with brackets and unary expressions.
(This is my first interpreter on VBA yay!)
First you have to download the module, and import it on PowerPoint or Excel.
After that you should be able to use the function Evaluate
to calculate an expression in a String.
' It returns the result in a string.
Eval.Evaluate(Expression)
Arithmetic Operators
Operator | Name | Priority |
---|---|---|
^ | Power | 3 |
* | Multiply | 2 |
/ | Division | 2 |
+ | Sum | 1 |
- | Subtraction | 1 |
Unary Expressions
Examples | Name |
---|---|
++ | Positive |
-- | Positive |
+- | Negative |
-+ | Negative |
--- | Negative |