Ignore zeros in formula

Fantrasp12

New Member
Joined
Jan 14, 2023
Messages
4
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hi. Nor an excel expert. But i have a formula that needs to sum and average...but can't use sumproduct because the range is not continuous (due to necessary layout of the assessment that i need to perform. So it goes like this
=((BM21*$H21)+(BT21*$I21)+(CA21*$J21)+(CH21*$K21)+(CO21*$L21)+(CV21*$M21)+(DC21*$N21)+(DJ21*$O21)+(DQ21*$P21))/IF(($H21+$I21+$J21+$K21+$L21+$M21+$N21+$O21+$P21)>0,$H21+$I21+$J21+$K21+$L21+$M21+$N21+$O21+$P21,1)

On the left are weights for topics, on the right are areas that are being assessed. This formula is averaging based on the weights applied (1-5) with the scores (1-5) on the right. The problem is when an area of left blank on the right (because the client doesn't have that area to assess and should be excluded and is left blank) it completely artificially tanks the overall average. I want to modify this formula to exclude anything that is either zero or left blank. I dont really understand arrays, so hopefully this formula can just be modified? If need to use arrays i would need specific instruction on this vs hypothetical. Many thanks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Do you need
Excel Formula:
=((BM21*$H21)+(BT21*$I21)+(CA21*$J21)+(CH21*$K21)+(CO21*$L21)+(CV21*$M21)+(DC21*$N21)+(DJ21*$O21)+(DQ21*$P21))/COUNTIF($H21:$P21,">0")

I'm looking at your formula and description, thinking that it should work so I'm obviously missing something. A visual sample of your data showing the problem that you're encountering would help to clarify any uncertainty.
 
Upvote 0

Forum statistics

Threads
1,214,874
Messages
6,122,036
Members
449,062
Latest member
mike575

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