b19upj

New Member
Joined
Oct 3, 2014
Messages
34
Office Version
  1. 365
Platform
  1. Windows
HI,

I have a question card with 5 questions 1,2,3,4,5 going down column A1, A2, A3, A4, A5.
I would like to work out the percentage of the score where the answers can be from 1-5 in column B next to its respective question number. BUT the questions can also be answered 0 if not applicable and i don't want that answer to be included in the percentage calculation.
So if i get the following results for each question 5,5,5,5,5 it will = 100%
but if i get 0,5,0,5,5 it should also = 100% (as the 0 should not be counted in the calculation).

Hope that make sense
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Try this:

=SUM(B1:B5)/(COUNTIF(B1:B5,">"&0)*5)

Set the format of this cell to be percentage with zero decimals.
 
Upvote 0
Try this:

=SUM(B1:B5)/(COUNTIF(B1:B5,">"&0)*5)

Set the format of this cell to be percentage with zero decimals.


I get a #DIV/0 error with tthe above formulae.

Any other ideas?
 
Upvote 0
My mistake, i had wired it into my spreadsheet wrongly.
This formula works perfectly.

Many thanks!!!!
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,543
Members
449,089
Latest member
davidcom

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