How do i write correct formula

Status
Not open for further replies.

PMRetired2012

Board Regular
Joined
Aug 6, 2019
Messages
123
Hello
The formula im trying to write is a formula like this one : =IF(ISNUMBER(AVERAGEIF(B22:AL22,">0")),AVERAGEIF(B22:AL22,">0"),"0") except where there is one range (B22:AL22) i want to use 3 ranges which are 3 diffrent rows( B4:AL4, B6:AL6,B8:AL8) All im really doing is adding 3 ranges after the average if and before the ">0" on both sides of formula.

Dennis
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Are there numbers anywhere in B5:AL5 or B7:AL7? If not then you could use
Excel Formula:
=AVERAGEIF(B4:AL8,">0")
 
Upvote 0
You might not want to do it with 20 rows but with only 3 it isn't too bad to do it 'long hand'

Excel Formula:
=(SUMIF(B4:AL4,">0")+SUMIF(B6:AL6,">0")+SUMIF(B8:AL8,">0"))/(COUNTIF(B4:AL4,">0")+COUNTIF(B6:AL6,">0")+COUNTIF(B8:AL8,">0"))

BTW, I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,386
Messages
6,119,214
Members
448,874
Latest member
b1step2far

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