How to get the average?

Romano_odK

Active Member
Joined
Jun 4, 2020
Messages
380
Office Version
  1. 365
Platform
  1. Windows
Good afternoon,

How do I get the average of 3 cells when not all the 3 cells are constantly filled in. For example,

Omzet Kohler groep 2023 1.08.xlsx
QRSTU
1MonthsSalesMonthsSales
2Jan15Jan15
3Feb36Feb
4Mar50Mar50
5Average33,7Average32,5
Omzet
Cell Formulas
RangeFormula
R5,U5R5=AVERAGE(R2:R4)


Here in the second mini table you see that it works, when 1 cell is empty it won't be counted as a divider.

Below is a part of 3 different pivot tables. I try do the same, but it does not work. The total gets devided by 3 and not 2 when a cell is empty.


=AVERAGE(GETPIVOTDATA("Marge";$B$24;"afldat";3;"Years";2023);GETPIVOTDATA("Marge";$B$40;"afldat";3;"Years";2023);GETPIVOTDATA("Marge";$B$56;"afldat";3;"Years";2023))
Values are
-35,0%
-39,0%
empty

result is
-24,7%

Which is not good. Should have been 37.
Thank you for your time.

Romano
 
take what I did and post it into your spreadsheet near your formula that isn't working.
Be sure the formula I have works with the data in my mini workbook.
Then insert your formulas into the formulas in D8 and D9 and D10.
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,223,897
Messages
6,175,270
Members
452,628
Latest member
dd2

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