如何根据Excel中的列中的乘数获得加权和? [英] How to get weighted sum depending on multipliers in column in Excel?

查看:252
本文介绍了如何根据Excel中的列中的乘数获得加权和?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Excel中有表:





C Sum )列中,我想以这种方式获得总和:




  • 如果列 A B 1 乘以金额 48 ,乘以乘数(1) = 2

  • 如果列 A B 0 ,然后取金额 48 ,乘以乘数(0) = 1,5

  • 然后 K1 K2 相加。






所以对于第2行,列 C 将是: 48 * 2 + 48 * 2 = 192

对于第5行该导致栏 C 将是: 48 * 1,5 + 48 * 2 = 168




是否可以使用 C 列的Excel公式自动执行此过程(列数列表)?

解决方案

或者你可以使用Countif(不短)

  = COUNTIF(A2:D2,0)* I $ 2 * I $ 1 + COUNTIF(A2:D2,1)* I $ 3 * I $ 1 


I have the table in Excel:

In column C (Sum) I want to get sum this way:

  • If in column A or B value is 1 then take Amount 48 and multiply by Multiplier (1) = 2.
  • If in column A or B value is 0 then take Amount 48 and multiply by Multiplier (0) = 1,5.
  • Then K1 and K2 summed.

So for row 2 the result in column C will be: 48*2 + 48*2 = 192.
For row 5 the result in column C will be: 48*1,5 + 48*2 = 168.


Is it possible to automate this process using Excel formula for C column (inspite of number of columns)?

解决方案

Or you could use Countif (no shorter though)

=COUNTIF(A2:D2,0)*I$2*I$1+COUNTIF(A2:D2,1)*I$3*I$1

这篇关于如何根据Excel中的列中的乘数获得加权和?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆