如何在多张纸上的同一单元格上执行IF语句,然后在另一张纸上显示真实值的总和? [英] How do I do an IF statement on the same cell on multiple sheets, then display the sum of the true values in another sheet?
问题描述
我有7张纸(日期1-7),它们在单元格C24中都有字母值,在D24中有货币值,我想检查所有7张纸的值是否均为A.请参见.
I have 7 sheets (Date 1-7) which all have a letter value in cell C24 and a monetary value in D24, I want to check if this value is A for all 7 sheets. See .
在第8个工作表上,我想显示所有工作表的总数,但是我只想添加D24的值,其中C24的值等于A.请参见.
On an 8th sheet I want to display the total for all sheets but I only want to add the value of D24 where the value of C24 was equal to A. See .
我可以使用以下IF语句检查一张纸的价值:
I can check the value of one sheet by using the following IF Statement:
= IF('日期1'!C24 ="A",'日期1'!D24,"0")
=IF('Date 1'!C24="A",'Date 1'!D24,"0")
任何帮助将不胜感激:)
Any help would be appreciated :)
推荐答案
首先用您要包含的工作表名称设置一列值,您将在下面看到将它们放在我的D列中工作表即
First set up a column of values with the names of the sheets that you want to include, you will see below that I have put them in column D of my worksheet; i.e.
日期1
日期2
...
日期7
然后使用以下excel公式.
Then use the following excel formula.
=SUMPRODUCT(SUMIF(INDIRECT("'"&D2:D8&"'!C24"), "A",INDIRECT("'"&D2:D8&"'!D24")))
这篇关于如何在多张纸上的同一单元格上执行IF语句,然后在另一张纸上显示真实值的总和?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!