View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Sum that ignores text

The Worksheet function SUM() (which you call as Application.Sum) does
handle text by ignoring it. But you said you're converting the inputs to
(numeric) values. Does that not work?

Perhaps some examples of what you're doing would help to clarify the
problem...

In article om,
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