Finding the correct % value

colin5392

Board Regular
Joined
Oct 25, 2016
Messages
69
Office Version
  1. 2019
Platform
  1. Windows
I have 20 assets (devices)

9 of the devices have vulnerabilities. Device 1 has 8 x critical vulnerabilities and 20 x High vulnerabilities.

How do I correctly determine the true percentage values of Critical vulnerabilities and High vulnerabilities against number of assets with issues identified and the total number of devices?

Thanks, in advance.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hey is this something you're after?

[TABLE="class: grid, width: 1000"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Device[/TD]
[TD]Crit V[/TD]
[TD]High V[/TD]
[TD]Count V[/TD]
[TD]Crit V %[/TD]
[TD]High V %[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Device 1[/TD]
[TD]8[/TD]
[TD]20[/TD]
[TD]1[/TD]
[TD]28.6%[/TD]
[TD]71.4%[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Device 2[/TD]
[TD][/TD]
[TD][/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Device 3[/TD]
[TD][/TD]
[TD][/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Device 4[/TD]
[TD][/TD]
[TD][/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Device 5[/TD]
[TD][/TD]
[TD][/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Device 6[/TD]
[TD]5[/TD]
[TD]13[/TD]
[TD]1[/TD]
[TD]27.8%[/TD]
[TD]72.2%[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Device 7[/TD]
[TD][/TD]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100.0%[/TD]
[TD]0.0%[/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD]Device 19[/TD]
[TD][/TD]
[TD][/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]21[/TD]
[TD]Device 20[/TD]
[TD][/TD]
[TD][/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]22[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]45%[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Columns B & C i populated with random data,

Column D (D2) holds the formula which can be copied down the D column: IF(COUNT(B2:C2)>0,1,0)

With D22 as: SUM(D2:D21)/COUNT(D2:D21)

Columns E (E2) holds the formula which can be copied down the E AND F column: IF($D2=1,B2/(SUM($B2:$C2)),"")
 
Upvote 0
Hey is this something you're after?

[TABLE="class: grid, width: 1000"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Device[/TD]
[TD]Crit V[/TD]
[TD]High V[/TD]
[TD]Count V[/TD]
[TD]Crit V %[/TD]
[TD]High V %[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Device 1[/TD]
[TD]8[/TD]
[TD]20[/TD]
[TD]1[/TD]
[TD]28.6%[/TD]
[TD]71.4%[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Device 2[/TD]
[TD][/TD]
[TD][/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Device 3[/TD]
[TD][/TD]
[TD][/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Device 4[/TD]
[TD][/TD]
[TD][/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD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[/TD]
[TD]1[/TD]
[TD]12.5%[/TD]
[TD]87.5%[/TD]
[/TR]
[TR]
[TD]18[/TD]
[TD]Device 17[/TD]
[TD][/TD]
[TD][/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]19[/TD]
[TD]Device 18[/TD]
[TD]3[/TD]
[TD][/TD]
[TD]1[/TD]
[TD]100.0%[/TD]
[TD]0.0%[/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD]Device 19[/TD]
[TD][/TD]
[TD][/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]21[/TD]
[TD]Device 20[/TD]
[TD][/TD]
[TD][/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]22[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]45%[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Columns B & C i populated with random data,

Column D (D2) holds the formula which can be copied down the D column: IF(COUNT(B2:C2)>0,1,0)

With D22 as: SUM(D2:D21)/COUNT(D2:D21)

Columns E (E2) holds the formula which can be copied down the E AND F column: IF($D2=1,B2/(SUM($B2:$C2)),"")

I'll give it a go - thank you for your assistance
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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