I'm using VB to write a macro in Excel. Now, VB has plenty of defined functions such as cos(), log(), etc., but I'd like to be able to use an _extremely_simple_ expression like

X = sum(A, B, C)

but I get the error that this function is not defined. There HAS to be some way of summing besides using the "+" operator...

If I use

X = math.sum(A, B, C), I also get an error.

It would be easy to do this with spreadsheet values, but I'd like to have the calculations take place within the macro.

If anyone knows how to do this, I would very much appreciate learning how!

Thanks.