Array formula - Weighted Average Price of filtered data above .01 cent

lshub

New Member
Joined
Jun 17, 2016
Messages
6
I am having trouble modifying a formula I built out to calculate what the weighted average price of a filtered set of data is. After a lot of trial and error, I was able to successfully create an array formula that could do the above. However, I now want to add if parameters to the formula that will ignore any blanks or prices at or below .01 cent. I've searched for an answer and tinkered with the formula for hours and just can't seem to get it exactly right.

Here is what I am working off of right now:
Column R is pricing and Column G is store volume.

{=SUM(SUBTOTAL(9,OFFSET(R8:R2900,ROW(R8:R2900)-MIN(ROW(R8:R2900)),0,1))*SUBTOTAL(9,OFFSET(G8:G2900,ROW(G8:G2900)-MIN(ROW(G8:G2900)),0,1)))/SUBTOTAL(9,G8:G2900)}

Anyone know what I would need to add/change to make that possible?
 
Re: Array forumla - Weighted Average Price of filtered data above .01 cent

That is...
Rich (BB code):
=SUMPRODUCT(SUBTOTAL(9,OFFSET(G8,ROW(G8:G2900)-ROW(G8),0,1)),
     --ISNUMBER(R8:R2900),--(R8:R2900>0.1),R8:R2900)/
  SUMPRODUCT(SUBTOTAL(9,OFFSET(G8,ROW(G8:G2900)-ROW(G8),0,1)),
     --ISNUMBER(R8:R2900),--(R8:R2900>0.1))

That worked perfectly, thank you!:biggrin:
 
Upvote 0

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,223,931
Messages
6,175,465
Members
452,645
Latest member
Tante

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