Below are some raw data with related formular:
以下是相关公式的一些原始数据:
Col A1, A2 & A3: 4, 6 & 12
Col B1, B2 & B3: 100, 150 & 120
Formular: = SUMPRODUCT(B1:B3/A1:A3)
I tried to add SUBTOTAL function in front of the above formular when filtering use, but it doesn’t work......Can you help on this?
当过滤使用时,我试图在上面的公式前面添加小计函数,但它不起作用……你能帮我吗?
The combined SUMPRODUCT DIVISION plus SUBTOTAL formular is expected when filtering use.Thx!
筛选使用时,应使用总和除法加小计公式。Thx!
更多回答
How did you "tried to add SUBTOTAL function"?
你是如何“尝试添加小计函数”的?
= SUBTOTAL(9, SUMPRODUCT(B1:B3/A1:A3))
=小计(9,SUMPRODUCT(B1:B3/A1:A3))
优秀答案推荐
Sum Up Divisions in a Filtered List Using AGGREGATE
Formula
公式式
=LET(n,B5:B7,d,A5:A7,
v,BYROW(d,LAMBDA(r,AGGREGATE(2,5,r))),
SUM(n/d*v))
The 1st BYROW
parameter can be either column. I opted for the divisor having in mind division by zero.
第一个BYROW参数可以是任一列。我选择了除数,心里想的是除数被零除。
Variables
变数
n - Numerator or Dividend
d - Denominator or Divisor
v - Visibility (1 or 0)
Legacy Excel
旧版Excel
=SUMPRODUCT(SUBTOTAL(109,OFFSET(B5,ROW(B5:B7)-ROW(B5),))/A5:A7)
更多回答
Hi, for ‘r’ & ‘s’ variables, what should I input as?
嗨,对于‘r’和‘S’变量,我应该输入什么?
It's a Microsoft 365 formula. The only thing you need to modify are the range references in the first row of the formula. I've added a formula for older Excel versions to the bottom of the post.
这是微软的365公式。您唯一需要修改的是公式第一行中的范围引用。我已经在这篇文章的底部添加了一个适用于旧版Excel的公式。
Sorry, I had a typo. The s
should have been a v
. Corrected. The r
variable is a variable used by the BYROW
function representing each row of the supplied 1st parameter d
.
对不起,我打错了。S本应改正A·V。R变量是BYROW函数使用的变量,表示所提供的第一个参数d的每一行。
我是一名优秀的程序员,十分优秀!