Totaling Heat Types by Towns

mkeohan

New Member
Joined
Jun 14, 2018
Messages
13
Hello Everyone,

I have a large list of addresses that have heat system types associated with them. I want to be able to get it into a format where it is just the town name and a total number of each heat type. I would normally do this manually but there are over 1 million addresses in this file. This forum wont let me post attachments for whatever reason so I have copied it below.

TownHEAT SYS
CONSTITUTION AVEABINGTONMA023512308745ELC
CONSTITUTION AVEABINGTONMA023512308844ELC
CONSTITUTION AVEABINGTONMA023512307719ELC
Jennings DrAbingtonMA023511526267Gas
Jennings DrAbingtonMA023511526366Gas
Jennings DrAbingtonMA023511525475Gas
CENTRE AVEABINGTONMA023512229374Oil
CENTRE AVEABINGTONMA023512229338Oil
CHERRY STABINGTONMA023512514142Oil
Pond StAvonMA0232202322-16241624431Gas
Pond StAvonMA0232202322-16241624297Gas
Pond StAvonMA0232202322-16241624954Gas
KING STAVONMA0232202322-12051205058Oil
BLANCHARD STAVONMA0232202322-12441244064Oil
BLANCHARD ST
AVONMA0232202322-12441244082
Oil

<colgroup><col style="width:48pt" width="64" span="5"> <col style="width:48pt" width="64"> <col style="width:48pt" width="64" span="6"> <col style="width:48pt" width="64"> </colgroup><tbody>
</tbody>

The desired result would be:

ELECGASOIL
Abington333
Avon33

<colgroup><col style="width:48pt" width="64" span="4"> </colgroup><tbody>
</tbody>

The two columns in questions are F=Towns and M=Heat Type

Please let me know if any of you can help. Thanks!
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
You can use COUNTIFS to do this.

Suppose that your data is in rows 2:16.
And then your summary has the town names in column P (so "Abington" is in cell P2, and "Avon" is in cell P3)
and the heat types are in cells Q1:S1.

Then place this formula in cell Q2 and copy to S3:
Code:
=COUNTIFS($F$2:$F$16,$P2,$M$2:$M$16,Q$1)
 
Upvote 0
using PowerQuery
- remove unnecessary columns
- capitalize words
- duplicate column
- pivot


Column1TownColumn2Column3Column4HEAT SYSColumn5Column6TownELCGasOil
CONSTITUTION AVEABINGTONMA
2351​
2308​
745​
ELCAbington
3​
3​
3​
CONSTITUTION AVEABINGTONMA
2351​
2308​
844​
ELCAvon
0​
3​
3​
CONSTITUTION AVEABINGTONMA
2351​
2307​
719​
ELC
Jennings DrAbingtonMA
2351​
1526​
267​
Gas
Jennings DrAbingtonMA
2351​
1526​
366​
Gas
Jennings DrAbingtonMA
2351​
1525​
475​
Gas
CENTRE AVEABINGTONMA
2351​
2229​
374​
Oil
CENTRE AVEABINGTONMA
2351​
2229​
338​
Oil
CHERRY STABINGTONMA
2351​
2514​
142​
Oil
Pond StAvonMA
2322​
02322-1624
1624​
431​
Gas
Pond StAvonMA
2322​
02322-1624
1624​
297​
Gas
Pond StAvonMA
2322​
02322-1624
1624​
954​
Gas
KING STAVONMA
2322​
02322-1205
1205​
58​
Oil
BLANCHARD STAVONMA
2322​
02322-1244
1244​
64​
Oil
BLANCHARD STAVONMA
2322​
02322-1244
1244​
82​
Oil
 
Upvote 0
Still having trouble here. Is what I used with that for that formula =COUNTIFS($F$2:$F$937063,$CE2,$M$2:$M$937063,CF$1) am I doing it right? I only get a zero as an answer. Those are the data ranges I had to move the P and Q down because I didn't include those rows for privacy reasons
 
Upvote 0
Try hard-coding the first one, just to test, i.e.
Code:
[COLOR=#333333]=COUNTIFS($F$2:$F$937063,"Abington",$M$2:$M$937063,"ELC")[/COLOR]
If that does not work, that probably means that you have extra characters in your data.
Check a row that should match, and see if there are any extra spaces on the word "ABINGTON" or "ELC".
 
Upvote 0
That worked! It gave me a value that is correct. How to I apply it to the whole sheet?
Is "Abington" in CE2 and "ELC" in "CF1"?
If so, then your original formula should have worked too.
If not, then you either have the wrong addresses there, or you have a typo in one of those cells.
 
Upvote 0

Similar threads

Forum statistics

Threads
1,214,788
Messages
6,121,582
Members
449,039
Latest member
Arbind kumar

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