Weighted Average Ignoring Blanks

cwhaley1

New Member
Joined
Nov 22, 2017
Messages
36
Hello. I have a spreadsheet which collates scores received and calculates a weighted average based on a number entered into a reference cell. The point of this sheet is to record scores received for projects after they have completed.

What I cannot understand is how to get the formula to ignore any blank scores. Not all questions asked are relevant to a project. At the moment if a blank score is input, the whole project score is reduced which is unfair.

This is my current formula (I can't post attachments):

=((O5/4*O$2)+(P5/4*P$2)+(Q5/4*Q$2)+(R5/4*R$2)+(S5/4*S$2)+(T5/4*T$2)+(U5/4*U$2)+(V5/4*V$2)+(W5/4*W$2))/(O$2+P$2+Q$2+R$2+S$2+T$2+U$2+V$2+W$2)

The cells in row 5 are the question scores (from 1 to 5) and the cells in row 2 are the scoring weightings.


I have tried IFERROR, but this doesn't work as intended (I may be using it wrong). I don't know which other formula could do the calculation and ignore the blanks. Maybe the source data for the formula needs to be input differently.

Just looking for some help if anybody can offer it!
 
Great ...!!!

Do you mean that within your KPI database ... O5 to W19 ...

you could get Text ...instead of Numbers ...?

Yes the scores in those columns (scored as 1 to 5) may sometimes contain "N/A". What I'm proposing is that on the scoring sheet (which feeds into the database sheet I have shared with you) is that if a question is not relevant, the scorer selects N/A and this would then be ignored and not used in the formula as it currently does if there's a blank (thanks to your original formula).
 
Last edited:
Upvote 0

Excel Facts

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

=SUMPRODUCT((O5:W5/4),O$2:W$2)/SUM(O$2:W$2)

suffice?

It could if question weightings didn't matter, but once the result of dividing by 4 is reached this then needs to be multiplied by the weightings in black text at the top of the sheet (row 2, O to W).
 
Upvote 0
It could if question weightings didn't matter, but once the result of dividing by 4 is reached this then needs to be multiplied by the weightings in black text at the top of the sheet (row 2, O to W).

You could post a tiny set of representative data (not the whole spreadsheet) along with the expected result for that tiny set.
 
Upvote 0
Seems the following Array formula avoids the N/A pitfall ...

Code:
=SUMPRODUCT((IF(O5:W5="N/A",0,O5:W5)/4)*O$2:W$2)/SUMPRODUCT(--(O5:W5<>"N/A")*--(O5:W5<>"")*(O$2:W$2))

Hope this will help
 
Upvote 0
Seems the following Array formula avoids the N/A pitfall ...

Code:
=SUMPRODUCT((IF(O5:W5="N/A",0,O5:W5)/4)*O$2:W$2)/SUMPRODUCT(--(O5:W5<>"N/A")*--(O5:W5<>"")*(O$2:W$2))

Hope this will help

That works exactly as intended -- thank you! I can now use the spreadsheet without the manual intervention on each scoring line.

Many thanks.
 
Upvote 0
That works exactly as intended -- thank you! I can now use the spreadsheet without the manual intervention on each scoring line.

Many thanks.

Glad you could fix your problem ... :smile:
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,154
Members
453,021
Latest member
Justyna P

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