Problem with calculating a cell across different sheets.

elmendaratata

New Member
Joined
Oct 18, 2023
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
As you can see in the first image, I want to calculate the average of cells B2:G11. For this, I've used the following formula:

=AVERAGE('Argentona - Mataró:Sese 2'!C2)

1697672773696.png


But then I realized that there are still some Excel sheets missing data for some months. So, I want to calculate the average with a condition: Calculate the average ONLY if there is a +0 value below. Example:

1697674125244.png
In this case, calculate B7 if B20 (because its 15-Aimat) has a 1. If it has nothing, then don't calculate.

In other words, calculate the average of B2 from the pages where B15 is >0. I say >0, because sometimes its no 1, it's 0,8, so it's important to include everithing that is not 0, not only the 1.
To do this, I wrote the following formula:

=AVERAGE.IF('Argentona - Mataró:Sese 2'!B15, ">0", 'Argentona - Mataró:Sese 2'!B2)

Since it didn't work, I changed and used this:

=AVERAGE(IF('Argentona - Mataró:Sese 2'!B15>0, 'Argentona - Mataró:Sese 2'!B2))

Then this:

=AVERAGEIFS('Argentona - Mataró:Sese 2'!B15, ">0", 'Argentona - Mataró:Sese 2'!B2)

But it continued to give me #VALUE!. I tried one last option:

=SUMIFS('Argentona - Mataró:Sese 2'!B15, ">0", 'Argentona - Mataró:Sese 2'!B2) / COUNTIFS('Argentona - Mataró:Sese 2'!B15, ">0")

But it still shows #VALUE!. Can anyone please help me? What's wrong?

I've attached images of the other sheets for reference:

1697674368173.png







1697674397047.png





1697674426061.png



1697674445490.png
 

Attachments

  • 1697674071515.png
    1697674071515.png
    9.1 KB · Views: 18

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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