Sum cells with specific format

R

Richard

Hi

How do I go about summing all the cells in a row based on their number format.

I will only have either 0.00% or #,##0.00 and need to sum the non pct
formatted cells.

Thanks in advance.

Regards
 
R

Richard

walk on water at the weekends do you,

thanks vm for your help, it's exactly what I needed.

I really do have to get my head around udf's

thanks again
 
R

Richard

Sorry I jumped the gun a little there, it worked great the first time, but
now all I get in the cell where the function is entered is #NAME?
The UDF is entered as part of a macro, but this shouldn't make any difference.

Can you advise
Thanks
 
N

Nigel

Hi
Not sure about walking on water at anytime!

Where have you stored the function? It should be in a standard module.


--

Regards,
Nigel
(e-mail address removed)
 
R

Richard

Nigel

Thanks for getting back to me on this.

Yes I have stored it in a standard module. It's odd as when I either edit
the cell with the udf and then enter with no changes, or I sort the table in
which the udf is included, the correct result appears. Unfortunately I
either have to edit each cell that contains the udf, or sort twice, once to
get the result and once to perform the sort.

Richard
 
R

Richard

Nigel

The solution I found was to enter the udf formula in each cell using a loop.
I was previously entering the formula by the use of an array.

Ah well, all sorted now.

Thanks for the help and advice
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top