View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Glenn Glenn is offline
external usenet poster
 
Posts: 1,240
Default Summing a range of cells with criteria

Fredrated wrote:
I am trying to use dsum(range,field,criteria) to sum values in 1 column when
another column equals 1, but I cannot understand from the help how the
criteria is determined from a range of cells.

from help: "Field indicates which column is used in the function"
But several columns are used in the function, so what does this mean?

One attempt:
=DSUM(R2:R340,25,Y1:Y341)
This is an attempt to add the values in column R rows 2 to 340 when column
Y(i.e., 25) for a given row is equal to 1. I placed a 1 into cell Y341.

Also tried, doesn't work:
=DSUM(R2:R340,18,Y1:Y341)
where 18 is column R, 'used in the function'.

However, this doesn't work, and I can't figure out from the help examples
exactly what the 'field' is or how criteria is to be expressed as a range of
cells.

Any help is appreciated, thanks.

Fred


Try this:

http://www.contextures.on.ca/xlFunctions01.html#SumIf