Calculate percentage of selected range/category from a large set of data

BrownEagle143

New Member
Joined
Nov 14, 2018
Messages
2
Hi all, I am new to mrExcel. I have a typical requirement. Currently I have one document which as the inventory of the vehicles. I need to calculate the percentage of the number of vehicles by city in a new column. The sample data as follows
CountryStateCityBrandno of cars
USAillinoisChicagoHyundai550
USAillinoisChicagoHonda1500
USAillinoisChicagoToyota2500
USAillinoisChicagoFord2200
USAillinoisChicagoChevrolet1200
USAillinoisChicagoKia450
USAillinoisAuroraHyundai800
USAillinoisAuroraHonda1200
USAillinoisAuroraToyota1242
USAillinoisAuroraFord2750
USAillinoisRockfordToyota758
USAillinoisRockfordFord350
USAIndianaIndianapolisHyundai550
USAIndianaIndianapolisHonda2458
USAIndianaIndianapolisToyota3685
USAIndianaIndianapolisFord1520
USAIndianaIndianapolisChevrolet2544
USAIndianaIndianapolisKia854
USAIndianaIndianapolisAudi450
USAIndianaIndianapolisBMW358
USAIndianaFort WayneHyundai230
USAIndianaFort WayneHonda1245
USAIndianaFort WayneToyota3551
USAIndianaFort WayneFord784
USAIndianaSouth BendHyundai1255
USAIndianaFort WayneHonda358
USAIndianaFort WayneToyota712

<tbody>
</tbody>


I need to calculate the percentage of vehicles in the next column by city in the following format

CountryStateCityBrandno of carspercentage
USAillinoisChicagoHyundai5506.55
USAillinoisChicagoHonda150017.86
USAillinoisChicagoToyota250029.76
USAillinoisChicagoFord220026.19
USAillinoisChicagoChevrolet120014.29
USAillinoisChicagoKia4505.36
USAillinoisChicago Total8400
USAillinoisAuroraHyundai80013.35
USAillinoisAuroraHonda120020.03
USAillinoisAuroraToyota124220.73
USAillinoisAuroraFord275045.89
USAillinoisAurora Total5992
USAillinoisRockfordToyota75868.41
USAillinoisRockfordFord35031.59
USAillinoisRockford Total1108
USAIndianaIndianapolisHyundai5504.43
USAIndianaIndianapolisHonda245819.79
USAIndianaIndianapolisToyota368529.67
USAIndianaIndianapolisFord152012.24
USAIndianaIndianapolisChevrolet254420.48
USAIndianaIndianapolisKia8546.88
USAIndianaIndianapolisAudi4503.62
USAIndianaIndianapolisBMW3582.88
USAIndianaIndianapolis Total12419
USAIndianaFort WayneHyundai2303.96
USAIndianaFort WayneHonda124521.43
USAIndianaFort WayneToyota355161.12
USAIndianaFort WayneFord78413.49
USAIndianaFort Wayne Total5810
USAIndianaSouth BendHyundai125553.98
USAIndianaSouth BendHonda35815.40
USAIndianaSouth BendToyota71230.62
USAIndianaSouth Bend Total2325

<tbody>
</tbody>


Thanks in Advance.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hi & welcome to MrExcel.
How about
=E2/SUMIF($C$2:$C$28,C2,$E$2:$E$28)
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

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