Averageifs with conditions

Evendis

New Member
Joined
Oct 14, 2021
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
Hi All,

I do have a 5 column spreadsheet. the first is the month of the year, the 2nd to the 5th column has some labels and data. from January to September, I want to average them all. However, I have 2 conditions for column 2 and 3.
I have set 2 cells of the data board and for the 1st cell I want to average if > than a certain % and for the second column a specific number, I want to average all columns . If one or wo of those of selection cells are blank I want the columns to simply average it. if 2 of those columns are blank then average all column. I have used this formula for one single cell : =AVERAGEIFS(B2:B10,C2:C10,">"&G3) and for the columns who are not linked to a selection just average based on the selection.

So, to recap, I want the average of B,C,D,E based on if G3 or H3 has data on both or one only one of those or on none of those, to get the accurate average on cells B11, C 11, D11 and E11. I want to be able to change cell G3 and H3 even delete them to get the full average on each cells on rows 11.

Can you help me adding the correct formula on B11, C11, D11 & E11 cells please.

Thank you very much for your help.
Evendis.
 

Attachments

  • Screenshot 2021-10-14 200142.png
    Screenshot 2021-10-14 200142.png
    25.2 KB · Views: 26

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Unless I'm missing something,
Excel Formula:
=AVERAGEIFS(B2:B10,C2:C10,">="&N(G3))
should work as long as there are no negative values in the table.
 
Upvote 0
Unless I'm missing something,
Excel Formula:
=AVERAGEIFS(B2:B10,C2:C10,">="&N(G3))
should work as long as there are no negative values in the table.
It doesn't work. to recap I need the correct formula on B11, C11, D11 & E11 cells. It's a 2 Averageifs formulas with 4 conditions: if both G3 and H3 have data, if only G3 have data, if only H3 has data and finally if both are blank. I need the average on all B11, C11, D11 & E11 cells based or not on G3 and or H3 conditions.

Can you help me ?
 
Upvote 0
It doesn't work.
It does work, whether or not it gives the results that you expect is something completely different. Your post contains a lot of information with little clarity, the answer that I provided was only as good as that.

You show one existing formula in your question, on which my suggestion was based, without more examples a lot is open to individual interpretation. There is nothing shown to relate G3 and H3 to D11 and E11. If you want a better answer, ask a better question.

Try posting your example using XL2BB, remember to include the expected results based on the sample provided.
 
Upvote 0
Try:

Book1 (version 1).xlsb
ABCDEFGH
1MONTHSAGENTSSVLAHTNCH
2Jan990%900190SVLAGENTS
3Feb1187%85522180%20
4Mar2075%795230
5Apr1362%911255
6May1553%950311
7Jun2186%729245
8Jul2279%820271
9Aug1720%855332
10Sep1721%876364
1121.086.0%729.0245.0
Sheet29
Cell Formulas
RangeFormula
B11:E11B11=AVERAGEIFS(B2:B10,$B2:$B10,">="&N($H$3),$C$2:$C$10,">="&N($G$3))
 
Upvote 0
Solution
Try:

Book1 (version 1).xlsb
ABCDEFGH
1MONTHSAGENTSSVLAHTNCH
2Jan990%900190SVLAGENTS
3Feb1187%85522180%20
4Mar2075%795230
5Apr1362%911255
6May1553%950311
7Jun2186%729245
8Jul2279%820271
9Aug1720%855332
10Sep1721%876364
1121.086.0%729.0245.0
Sheet29
Cell Formulas
RangeFormula
B11:E11B11=AVERAGEIFS(B2:B10,$B2:$B10,">="&N($H$3),$C$2:$C$10,">="&N($G$3))
Thanks Eric for your help, I really appreciate. We are almost there. We I put on G3 80%, SVL, then all columns average, however when I add on H3 17 (Agents), B11, D11 and E11 do not average. Can you help me please ?
 
Upvote 0
What is your expected result? If you put in 80% and 17, then the only row that satisfies BOTH conditions is row 7, which is what the formula gives you. Or do you want a formula where EITHER condition is true?
 
Upvote 0
Thanks Eric for your help, I really appreciate. We are almost there. We I put on G3 80%, SVL, then all columns average, however when I add on H3 17 (Agents), B11, D11 and E11 do not average. Can you help me please ?
Apologizes, I forgot one single $ in my formula. It looks like it works !!! Thanks a lot Eric for your help.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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