Sum that ignores text
=sum() adds numbers.
Strings like: 1234+34-3465-2345+(1234/2143)
aren't numbers
But maybe you could use application.evaluate() to evaluate a string that looks
like a formula.
Smurfette18 wrote:
Hi,
I am trying to do a simple sum using inputs taken from userform
comboboxes. The problem is that the inputs can contain the text
character "-", and this is causing an error. I have tried converting
the inputs to values using val, cval, cdec, etc, but I think that the
problem is that the application.sum function in VBA, like the simple
operation "+", can't handle text. Any ideas about how to deal with
this?
Thanks!
-Tim
--
Dave Peterson
|