ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Summing cells (https://www.excelbanter.com/excel-programming/410860-summing-cells.html)

phinsxiii

Summing cells
 
This may be a really stupid question, but here I go. I want an equation that
will only summ cells in a row in a specific range of cells if one cell in
another range matches a set criteria. For example, I only want to sum those
cells in range D3:F16 if the value in a cell located in cloumn A matches a
specific value. So if A1 is the only cell in column A that matches the
criteria, then D1:F1 are summed.

Rick Rothstein \(MVP - VB\)[_1917_]

Summing cells
 
Try something like this...

=IF(A1=<YourCriteria,SUM(D3:F16),"")

Rick


"phinsxiii" wrote in message
...
This may be a really stupid question, but here I go. I want an equation
that
will only summ cells in a row in a specific range of cells if one cell in
another range matches a set criteria. For example, I only want to sum
those
cells in range D3:F16 if the value in a cell located in cloumn A matches a
specific value. So if A1 is the only cell in column A that matches the
criteria, then D1:F1 are summed.



phinsxiii

Summing cells
 
Almost. What I really want it to do is just some the cells in the same row
as the cell that matches the criteria. But I do not want to have to do this
row by row. I just want to set the column that contains the cells for
matching and then the range of cells that contain all of the data. That way
I only need to adjust my matching criteria.

Thanks:)


"Rick Rothstein (MVP - VB)" wrote:

Try something like this...

=IF(A1=<YourCriteria,SUM(D3:F16),"")

Rick


"phinsxiii" wrote in message
...
This may be a really stupid question, but here I go. I want an equation
that
will only summ cells in a row in a specific range of cells if one cell in
another range matches a set criteria. For example, I only want to sum
those
cells in range D3:F16 if the value in a cell located in cloumn A matches a
specific value. So if A1 is the only cell in column A that matches the
criteria, then D1:F1 are summed.




Heera

Summing cells
 
do you mean to say if A1 has an value say 50.

then it should sum number of 50's which are there in D3:F16.

If yes use this formula.

=(COUNTIF(A1,D3:F16)*A1)


All times are GMT +1. The time now is 04:19 AM.

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