Re: SUMIF and cell references.



On Mon, Mar 26, 2001 at 05:36:53PM -0800, Gordon Oliver wrote:
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?

This just popped up in my mailbox.  I have no idea why it took so
long.  Gotta love @home.

Yes there is definitely a way to do this.
   SUMIF(A1:A35,"=A40",C1:C35)
    SUMIF(A1:A35,"="&A40,C1:C35)




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