SUMIF and cell references.



Hi.
  I'd like to use SUMIF to write a simple formula that would use a reference in
the criteria, and cannot figure out how to do so (the documentation only has
simple cases...)

The basic idea is:
   SUMIF(A1:A35,"=A40",C1:C35)

where A1-A35 have names, and then C40 would have the sums for column
C that match the name in A40... Obviously the above code does not work... it
compares to the string constant "A40" (as far as I can tell).

The reason is that I'd really rather not hard code those names into the cell
function, as you don't see that unless you look.. (I hate duplicating constants,
esp. in places I don't see them)...

Is there any way to do this?

        thanks in advance,
        -gordon




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]