Can IF be used to sum?

G

Guest

I have a table that was a dbf in a GIS. I have one column that is the name
of a soil type and another column is the area that the soil occupies. The
problem is, I have a bunch of rows for each soil type. I want to figure out
the sum total of the area that each soil type occupies without having to
manually sum each group. Some of the soil types have upwards of 20 rows that
need to be added together and others are only 1 row. So, is there a way that
an IF statement (or something else) can add up those areas that have the same
"soil type"? Or am I expecting too much? Any advice is much appreciated.
Thanks.
 
P

Peo Sjoblom

Sounds like you could use pivot tables for this, instructions here

http://peltiertech.com/Excel/Pivots/pivotstart.htm

another way would be to sort the table and use data>subtotals, then
select for each change in soil type

finally you could use

=SUMIF(A2:A100,"soil type",B2:B100)

where A2:A100 holds the soil type and B2:B100 the area

replace soil type with the de facto name or with a cell like

=SUMIF(A2:A100,C2,B2:B100)

and put the soil type in the cell


Regards,

Peo Sjoblom

www.nwexcelsolutions.com
 
M

Manju

Alpruett said:
I have a table that was a dbf in a GIS. I have one column that is the name
of a soil type and another column is the area that the soil occupies. The
problem is, I have a bunch of rows for each soil type. I want to figure out
the sum total of the area that each soil type occupies without having to
manually sum each group. Some of the soil types have upwards of 20 rows that
need to be added together and others are only 1 row. So, is there a way that
an IF statement (or something else) can add up those areas that have the same
"soil type"? Or am I expecting too much? Any advice is much appreciated.
Thanks.

Try using SUMIF function. Use excel help for the function it has got an
example also.

Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top