ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   What formula to use? (https://www.excelbanter.com/excel-worksheet-functions/125816-what-formula-use.html)

plunk25

What formula to use?
 
I have an excel sheet with two columns that I need to pull data from. One
column contains employee names, the other contains a district number for each
employee, and the other contains the number of classes taken for each
employee.

I need to create another worksheet that contains the total number classes
taken per district. How would I go about doing this?

Teethless mama

What formula to use?
 
=SUMPRODUCT(--(B1:B100="district number"),C1:C100)
adjust to suit


"plunk25" wrote:

I have an excel sheet with two columns that I need to pull data from. One
column contains employee names, the other contains a district number for each
employee, and the other contains the number of classes taken for each
employee.

I need to create another worksheet that contains the total number classes
taken per district. How would I go about doing this?


T. Valko

What formula to use?
 
Assume you have the unique district numbers listed on sheet2 in the range
A2:An

The other data is on sheet1, district numbers in B2:B10 and classes taken in
C2:10

Enter this formula on sheet2 in cell B2:

=SUMIF(Sheet1!B$2:B$10,A2,Sheet1!C$2:C$10)

Copy down as needed.

Biff

"plunk25" wrote in message
...
I have an excel sheet with two columns that I need to pull data from. One
column contains employee names, the other contains a district number for
each
employee, and the other contains the number of classes taken for each
employee.

I need to create another worksheet that contains the total number classes
taken per district. How would I go about doing this?





All times are GMT +1. The time now is 10:15 PM.

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