elmendaratata
New Member
- Joined
- Oct 18, 2023
- Messages
- 1
- Office Version
- 2019
- Platform
- 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)
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:
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:
=AVERAGE('Argentona - Mataró:Sese 2'!C2)
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:
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: