ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   SUM - but ignoring text in the data range (https://www.excelbanter.com/excel-discussion-misc-queries/186639-sum-but-ignoring-text-data-range.html)

Carol

SUM - but ignoring text in the data range
 
Does anyone know how to get the total of a data range which consists of a mix
of values and #VALUE! text. The cells in the data range are using an INDEX
formula, so I want to ignore the cells that don't generate a value, but count
up the ones that did generate a value. (Without manually selecting the 'good'
cells).

Any ideas?

Thanks in advance.

Niek Otten

SUM - but ignoring text in the data range
 
Change the formulas in the cells to be summed:

=IF(ISERROR(YourFormula),"",YourFormula)

Or use a helper column to avoid evaluating all formulas twice.


--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"carol" wrote in message ...
| Does anyone know how to get the total of a data range which consists of a mix
| of values and #VALUE! text. The cells in the data range are using an INDEX
| formula, so I want to ignore the cells that don't generate a value, but count
| up the ones that did generate a value. (Without manually selecting the 'good'
| cells).
|
| Any ideas?
|
| Thanks in advance.



Mike H

SUM - but ignoring text in the data range
 
One way

=SUM(IF(ISNUMBER(A1:A100),A1:A100,FALSE))

Which is an array formula so commit with
Ctrl+Shift+Enter.

Mike
"carol" wrote:

Does anyone know how to get the total of a data range which consists of a mix
of values and #VALUE! text. The cells in the data range are using an INDEX
formula, so I want to ignore the cells that don't generate a value, but count
up the ones that did generate a value. (Without manually selecting the 'good'
cells).

Any ideas?

Thanks in advance.


JE McGimpsey

SUM - but ignoring text in the data range
 
In general, allowing errors as expected values is terrible practice - it
masks other (real) errors, and it desensitizes the user to error values.

Better to trap the #VALUE! errors in the first place. For instance, if
the #VALUE! error is caused by

=A1 + B1

where A1 or B1 may contain text, use

=IF(COUNT(A1:B1)=2,A1+B1,"")

or

=SUM(A1,B1)

since SUM() ignores text.

If you trap the errors first, you can use SUM() to total your range.


In article ,
carol wrote:

Does anyone know how to get the total of a data range which consists of a mix
of values and #VALUE! text. The cells in the data range are using an INDEX
formula, so I want to ignore the cells that don't generate a value, but count
up the ones that did generate a value. (Without manually selecting the 'good'
cells).

Any ideas?

Thanks in advance.



All times are GMT +1. The time now is 02:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com