How to sum with multiple criteria in 2 different columns? - census data

thirty6chambers

New Member
Joined
Aug 13, 2024
Messages
1
Office Version
  1. 365
Platform
  1. MacOS
I am trying to organize some census data and am looking for a more optimized solution. I have a table that includes data for 12 different counties and want to find the number of "Manufacturing" establishments that are under 20 employees and the number of "Manufacturing" establishments between 20 to 999 employees. Any help or guidance would be greatly appreciated, thanks!



CBP2022.NewOrleans.xlsx
ABCDEFGHIJKLM
1Geographic Area NameMeaning of NAICS CodeMeaning of Employment size of establishments codeYearNumber of establishmentsNumber of employees
2Jefferson Parish, LouisianaTotal for all sectorsAll establishments202211,729174,764Establishments with 1 to 4 employees20726SMB 1-1933624
3Jefferson Parish, LouisianaTotal for all sectorsEstablishments with less than 5 employees20225,995NEstablishments with 5 to 9 employees7658Mid 20-99911109
4Jefferson Parish, LouisianaTotal for all sectorsEstablishments with 5 to 9 employees20222,323NEstablishments with 10 to 19 employees5240
5Jefferson Parish, LouisianaTotal for all sectorsEstablishments with 10 to 19 employees20221,600NEstablishments with 20 to 49 employees3815
6Jefferson Parish, LouisianaTotal for all sectorsEstablishments with 20 to 49 employees20221,162NEstablishments with 50 to 99 employees1211
7Jefferson Parish, LouisianaTotal for all sectorsEstablishments with 50 to 99 employees2022375NEstablishments with 100 to 249 employees648
8Jefferson Parish, LouisianaTotal for all sectorsEstablishments with 100 to 249 employees2022214NEstablishments with 250 to 499 employees153
9Jefferson Parish, LouisianaTotal for all sectorsEstablishments with 250 to 499 employees202241NEstablishments with 500 to 999 employees42
10Jefferson Parish, LouisianaTotal for all sectorsEstablishments with 500 to 999 employees202213N
11Jefferson Parish, LouisianaTotal for all sectorsEstablishments with 1,000 employees or more20226N
12Jefferson Parish, LouisianaTotal for all sectorsEstablishments with 1,000 to 1,499 employees20223N
13Jefferson Parish, LouisianaAgriculture, forestry, fishing and huntingAll establishments20221434
14Jefferson Parish, LouisianaAgriculture, forestry, fishing and huntingEstablishments with less than 5 employees202212NUtilities219
15Jefferson Parish, LouisianaMining, quarrying, and oil and gas extractionAll establishments202226317Construction4104
16Jefferson Parish, LouisianaMining, quarrying, and oil and gas extractionEstablishments with less than 5 employees202215NManufacturing#VALUE!
17Jefferson Parish, LouisianaMining, quarrying, and oil and gas extractionEstablishments with 5 to 9 employees20223NWholesale trade#VALUE!
18Jefferson Parish, LouisianaMining, quarrying, and oil and gas extractionEstablishments with 10 to 19 employees20224NRetail trade
19Jefferson Parish, LouisianaUtilitiesAll establishments202222566Transportation and warehousing
20Jefferson Parish, LouisianaUtilitiesEstablishments with less than 5 employees202210NInformation
21Jefferson Parish, LouisianaUtilitiesEstablishments with 5 to 9 employees20223NFinance and insurance
22Jefferson Parish, LouisianaUtilitiesEstablishments with 20 to 49 employees20224NReal estate and rental and leasing
23Jefferson Parish, LouisianaUtilitiesEstablishments with 50 to 99 employees20225NProfessional, scientific, and technical services
24Jefferson Parish, LouisianaConstructionAll establishments20221,04910,218Management of companies and enterprises
25Jefferson Parish, LouisianaConstructionEstablishments with less than 5 employees2022619NAdministrative and support and waste management and remediation services
26Jefferson Parish, LouisianaConstructionEstablishments with 5 to 9 employees2022190NEducational services
27Jefferson Parish, LouisianaConstructionEstablishments with 10 to 19 employees2022114NHealth care and social assistance
28Jefferson Parish, LouisianaConstructionEstablishments with 20 to 49 employees202285NArts, entertainment, and recreation
29Jefferson Parish, LouisianaConstructionEstablishments with 50 to 99 employees202226NAccommodation and food services
30Jefferson Parish, LouisianaConstructionEstablishments with 100 to 249 employees202215NOther services (except public administration)
31Jefferson Parish, LouisianaManufacturingAll establishments20222607,479
32Jefferson Parish, LouisianaManufacturingEstablishments with less than 5 employees2022102N
Data
Cell Formulas
RangeFormula
M2M2=SUM(J2:J4)
M3M3=SUM(J4:J9)
J2:J9J2=SUMIFS(Table1[Number of establishments],Table1[Meaning of Employment size of establishments code],C3,Table1[Meaning of NAICS Code],B3)
J14J14=SUMIFS(E2:E1193,Table1[Meaning of NAICS Code],B19)
J15J15=SUMIFS(E3:E1194,Table1[Meaning of NAICS Code],B24)
J16J16=SUMIFS(Table1[[#All],[Number of establishments]],Table1[Meaning of NAICS Code],"Manufacturing")
J17J17=SUMIFS(Table1[Number of establishments],B4:B1193,B39)
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hello, please test this if it works as intended:

Excel Formula:
=LET(
a,C2:C32,
b,IFNA(IF(a="Establishments with less than 5 employees",5,--(TEXTBEFORE(TEXTAFTER(a,"Establishments with ")," to"))),""),
SUM(FILTER(E2:E32,(B2:B32="Manufacturing")*(b>=1)*(b<20),0)))

Excel Formula:
=LET(
a,C2:C32,
b,IFNA(IF(a="Establishments with less than 5 employees",5,--(TEXTBEFORE(TEXTAFTER(a,"Establishments with ")," to"))),""),
SUM(FILTER(E2:E32,(B2:B32="Manufacturing")*(b>=20)*(b<1000),0)))
 
Upvote 0

Forum statistics

Threads
1,223,879
Messages
6,175,148
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top