Excel question

Soapy Bones

Senior member
Dec 4, 2003
397
0
76
I have a huge database that has an employment code and then the number of people employed by each occupation. Most of the codes are repeated. I want to sum up the number of people employed in each occupation, which could be done by summing up the number of people employed in a particular code because they are the same. I have thought of If( statements but that would be impossibly long, but is there something else I can do. I want to basically have it scroll the list of codes and everytime it finds one that is the same i want it to go over to a particular column and sum them all up. Is there any way to accomplish this?
 

Soapy Bones

Senior member
Dec 4, 2003
397
0
76
I have been working with a Vlookup, however I'm not sure just how its going to work. That will go through a list and find a particular value and give me a quantity from the same column. However, I want to go down the list, get all of them that are the same number and sum the quantity together.
 

InverseOfNeo

Diamond Member
Nov 17, 2000
3,719
0
0
I think that if your data wasnt in a database, you could use the countif function which would do what you want.
 

WildHorse

Diamond Member
Jun 29, 2003
5,006
0
0
Have you heard that saying, "Get the right tool for the job?"
I have a huge database

Excel isn't the right tool for a "huge" db.

Instead of Excel, move to a relational database system.

Then, the task you asked about doing is a simple SQL statement you can run on your database.
 

KLin

Lifer
Feb 29, 2000
30,957
1,081
126
Originally posted by: lather164
I have a huge database that has an employment code and then the number of people employed by each occupation. Most of the codes are repeated. I want to sum up the number of people employed in each occupation, which could be done by summing up the number of people employed in a particular code because they are the same. I have thought of If( statements but that would be impossibly long, but is there something else I can do. I want to basically have it scroll the list of codes and everytime it finds one that is the same i want it to go over to a particular column and sum them all up. Is there any way to accomplish this?

Click Data, then subtotals.