From: m2home on
I have rows of different activities listed by description. I now need to
allocate numeric codes to those descriptions. There are about 20 different
codes I need to use. Is it possible to then total those codes on the bottom
PER code (i.e. all codes of 115 total on the bottom in one cell, all codes of
135 total on the bottom in another cell) or do I have to do a separate column
for each code? Thanks.
From: JLatham on
Look at SUMIF(). If codes in column A and values in column B:
=SUMIF(A1:A100,115,B1:B100)
and then
=SUMIF(A1:A100,135,B1:B100)

You could even have a cell set up to enter the code to total, as enter the
code in C1 and in C2 have a formula like =SUMIF(A:A,C$2,B:B)
We can use whole columns for this to keep from having to continually adjust
the range as long as the SUMIF() formula is not in the same column as the
codes and values.

"m2home" wrote:

> I have rows of different activities listed by description. I now need to
> allocate numeric codes to those descriptions. There are about 20 different
> codes I need to use. Is it possible to then total those codes on the bottom
> PER code (i.e. all codes of 115 total on the bottom in one cell, all codes of
> 135 total on the bottom in another cell) or do I have to do a separate column
> for each code? Thanks.