Google Sheet数组公式

Google Sheet array formula

我有一个问题 google sheet 我有几篇文章有一个 ID,一个价格,然后是一个购买的文章列表。我用逗号分隔的数字表示购买的商品列表。

我知道如何通过我把它放在 sheet 中的 id 找到它的价格。现在我想知道如何获得购买的文章总数,但我找不到解决方案。

你能帮帮我吗?

Link to view the sheet

这是一份 HLOOKUP

的工作
=HLOOKUP(F2;$A:$B;2;FALSE)

这个可以读

Look up, based on the key in F2, the row in the range A2:B8, and take the 2nd column. Don't rely on the keys being sorted

在E2尝试

=ArrayFormula(mmult(iferror(vlookup(split(D2:D8; ","); A2:B8; 2; 0); 0); {1;1;1}))

这就是你想要达到的目标吗?