ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adding cells that meet certain criteria (https://www.excelbanter.com/excel-programming/348112-re-adding-cells-meet-certain-criteria.html)

Charlie

Adding cells that meet certain criteria
 
in Y1
=SUM(IF(A1:X10,A1:X1))
in Z1
=SUM(IF(A1:X1<0,A1:X1))

NOTE: after entering the formulas you must hold down both the Shift and Ctrl
keys at the same time, then press Enter (Ctrl+Shift+Enter). You will see the
formula in curly braces if you do it correctly. This gives you an "array
formula" to calclulate on the whole range.

{=SUM(IF(A1:X10,A1:X1))}

"PattiP" wrote:

I have a row of 24 numbers, A1:X1. I would like Y1 to SUM only those cells
if they have negative numbers in them and Z1 to SUM only those cells that
have positive numbers. Thanks!
--
Patti


PattiP

Adding cells that meet certain criteria
 
Thanks to you both !!!!
--
Patti


"Charlie" wrote:

in Y1
=SUM(IF(A1:X10,A1:X1))
in Z1
=SUM(IF(A1:X1<0,A1:X1))

NOTE: after entering the formulas you must hold down both the Shift and Ctrl
keys at the same time, then press Enter (Ctrl+Shift+Enter). You will see the
formula in curly braces if you do it correctly. This gives you an "array
formula" to calclulate on the whole range.

{=SUM(IF(A1:X10,A1:X1))}

"PattiP" wrote:

I have a row of 24 numbers, A1:X1. I would like Y1 to SUM only those cells
if they have negative numbers in them and Z1 to SUM only those cells that
have positive numbers. Thanks!
--
Patti



All times are GMT +1. The time now is 10:35 PM.

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