ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   lookup serch term and return sum of all values (https://www.excelbanter.com/excel-worksheet-functions/61527-lookup-serch-term-return-sum-all-values.html)

soilcon1

lookup serch term and return sum of all values
 
I have a spreadsheet that has (among many other things) three columns of data
for one farm. (see abbreviated example below) One is a field identifier, the
next the practice occuring on that field, and the next the size of the field.
At the end of the ACRES column, there is a total of acres for the whole
farm. I want a function that will identify all of the same practice and give
me the total of acres for that practice so that I can find what percentage of
the practice is occuring over the whole farm. For example, I want a function
that will identify all the 441 practices and tell me that there are 19.8
acres of that practice in total. I have tried VLOOKUP to find 441 and return
values in the 3rd row, but I could not figure out how to find all the 441's
and return the total of acres for that practice. Any ideas?

FIELD PRACTICE ACRES
a 441 2.1
b 442 13.2
c 443 12.8
d 441 0.5
e 441 17.2
f 443 11.1
TOTAL 56.9


bpeltzer

lookup serch term and return sum of all values
 
What you described is what SUMIF does... =sumif(b2:b10,441,c2:c10). The
second argument is what to look for, the first is where to look for it, and
the third is what to add upon finding it.

"soilcon1" wrote:

I have a spreadsheet that has (among many other things) three columns of data
for one farm. (see abbreviated example below) One is a field identifier, the
next the practice occuring on that field, and the next the size of the field.
At the end of the ACRES column, there is a total of acres for the whole
farm. I want a function that will identify all of the same practice and give
me the total of acres for that practice so that I can find what percentage of
the practice is occuring over the whole farm. For example, I want a function
that will identify all the 441 practices and tell me that there are 19.8
acres of that practice in total. I have tried VLOOKUP to find 441 and return
values in the 3rd row, but I could not figure out how to find all the 441's
and return the total of acres for that practice. Any ideas?

FIELD PRACTICE ACRES
a 441 2.1
b 442 13.2
c 443 12.8
d 441 0.5
e 441 17.2
f 443 11.1
TOTAL 56.9


soilcon1

lookup serch term and return sum of all values
 
That is awsome! Thanks so much, that's exactly what I needed.

"bpeltzer" wrote:

What you described is what SUMIF does... =sumif(b2:b10,441,c2:c10). The
second argument is what to look for, the first is where to look for it, and
the third is what to add upon finding it.

"soilcon1" wrote:

I have a spreadsheet that has (among many other things) three columns of data
for one farm. (see abbreviated example below) One is a field identifier, the
next the practice occuring on that field, and the next the size of the field.
At the end of the ACRES column, there is a total of acres for the whole
farm. I want a function that will identify all of the same practice and give
me the total of acres for that practice so that I can find what percentage of
the practice is occuring over the whole farm. For example, I want a function
that will identify all the 441 practices and tell me that there are 19.8
acres of that practice in total. I have tried VLOOKUP to find 441 and return
values in the 3rd row, but I could not figure out how to find all the 441's
and return the total of acres for that practice. Any ideas?

FIELD PRACTICE ACRES
a 441 2.1
b 442 13.2
c 443 12.8
d 441 0.5
e 441 17.2
f 443 11.1
TOTAL 56.9



All times are GMT +1. The time now is 04:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com