ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to exclude a cell(s) from a range w/o mult. ranges on any fcn (https://www.excelbanter.com/excel-worksheet-functions/140280-how-exclude-cell-s-range-w-o-mult-ranges-any-fcn.html)

civileng

How to exclude a cell(s) from a range w/o mult. ranges on any fcn
 
In an excel function, is it possible to exclude a cell or cells from a range.

Example:

=Average(A5:A20), but exclude a few cells, say A10 and A15

I am aware of one way: =Average(A5:A9,A11:A14,A16:A20)

but is there a possible way to exclude cells in a range within the fuction,
such as =Average(A5:A20,not A10, not A15)

Thanks

Teethless mama

How to exclude a cell(s) from a range w/o mult. ranges on any fcn
 
=(SUM(A5:A20)-SUM(A10:A15))/(COUNT(A5:A20)-COUNT(A10:A15))


"civileng" wrote:

In an excel function, is it possible to exclude a cell or cells from a range.

Example:

=Average(A5:A20), but exclude a few cells, say A10 and A15

I am aware of one way: =Average(A5:A9,A11:A14,A16:A20)

but is there a possible way to exclude cells in a range within the fuction,
such as =Average(A5:A20,not A10, not A15)

Thanks


David Biddulph[_2_]

How to exclude a cell(s) from a range w/o mult. ranges on any fcn
 
I think the OP wanted to exclude only A10 and A15, not the ones between.
Might be worth trying
=(SUM(A5:A20)-SUM(A10,A15))/(COUNT(A5:A20)-COUNT(A10,A15)) ?
--
David Biddulph

"Teethless mama" wrote in message
...
=(SUM(A5:A20)-SUM(A10:A15))/(COUNT(A5:A20)-COUNT(A10:A15))


"civileng" wrote:

In an excel function, is it possible to exclude a cell or cells from a
range.

Example:

=Average(A5:A20), but exclude a few cells, say A10 and A15

I am aware of one way: =Average(A5:A9,A11:A14,A16:A20)

but is there a possible way to exclude cells in a range within the
fuction,
such as =Average(A5:A20,not A10, not A15)

Thanks





All times are GMT +1. The time now is 03:14 AM.

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