Trying to get averageif subtotal to work with filter

Chris333

New Member
Joined
Feb 27, 2022
Messages
3
Office Version
  1. 2019
Platform
  1. Windows
Hello,

I am wondering if anyone could help me out. I'm trying to get the average of Column D based of the status of Column A and still apply a working filter. I can either get my averages to match correctly with with the status of column A or get the averages to work with the filter. I cannot seem to get the average(if(subtotal to all work together. Here is the formula I am attempting to use =AVERAGE(IF(SUBTOTAL(9,OFFSET(D13,ROW(D13:D2603)-ROW(D13),0,1)),--(A13:A2603="Sold"))). I kind of pieced this together from a bunch of different sources from around the web since I couldn't find the exact solution I was looking for. The formula doesn't even seem to recognize the data in column D. If I switch my status from " sold" to "Canceled" in column A, the highlighted cell seems to count backward from 100%. Could anyone please assist me with this formula?

Thank you,
 

Attachments

  • Excell forum.PNG
    Excell forum.PNG
    77.8 KB · Views: 27

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi & welcome to MrExcel.
Why not use a helper column with
Excel Formula:
=SUBTOTAL(3,A13)
and then you can use the averageifs function like
Excel Formula:
=AVERAGEIFS(D13:D2603,A13:A2603,"Sold",H13:H2603,1)
just change the H column to where you have the subtotal formula
 
Upvote 0
Hi & welcome to MrExcel.
Why not use a helper column with
Excel Formula:
=SUBTOTAL(3,A13)
and then you can use the averageifs function like
Excel Formula:
=AVERAGEIFS(D13:D2603,A13:A2603,"Sold",H13:H2603,1)
just change the H column to where you have the subtotal formula
Hi!
Thank you for the response back, I will give this a try.
 
Upvote 0
Hello,

I took your advice and did end up pursing a helper column. It was a bit complicated but in the end I did get it to work the way I wanted to. Thanks again for the advice!!
 
Upvote 0
Glad you sorted it & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,559
Members
449,089
Latest member
Motoracer88

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