Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel 使用或和+;VBA工作表function.Sumifs中的条件_Excel_Vba_Formula - Fatal编程技术网

Excel 使用或和+;VBA工作表function.Sumifs中的条件

Excel 使用或和+;VBA工作表function.Sumifs中的条件,excel,vba,formula,Excel,Vba,Formula,你好 我想知道是否有一种方法可以将这两个宏组合在一起,因为如果它有一个或两个(自定义)信用“或“信用”标准, 多谢各位 Range("DebtorList_Credit") = Application.SumIfs( _ Range("Invoice_list_Price"), _ Range("Invoice_list_Debtor"), _ Range("Debtor_list_Debtors"), _ Range("InvoiceList_Payed"), _ "CR

你好
我想知道是否有一种方法可以将这两个宏组合在一起,因为如果它有一个或两个
(自定义)信用“
“信用”
标准,
多谢各位

Range("DebtorList_Credit") = Application.SumIfs( _ 
  Range("Invoice_list_Price"), _
  Range("Invoice_list_Debtor"), _
  Range("Debtor_list_Debtors"), _
  Range("InvoiceList_Payed"), _
  "CREDIT")

Range("DebtorList_Credit") = Application.SumIfs( _
  Range("Invoice_list_Price"), _
  Range("Invoice_list_Debtor"), _
  Range("Debtor_list_Debtors"), _
  Range("InvoiceList_Payed"), _
  "(Custom) CREDIT")

我完全误解了你的问题,还是这就是你想要的

Range("DebtorList_Credit") = Application.SumIfs( _ 
  Range("Invoice_list_Price"), _
  Range("Invoice_list_Debtor"), _
  Range("Debtor_list_Debtors"), _
  Range("InvoiceList_Payed"), _
  "CREDIT")

Range("DebtorList_Credit") = Range("DebtorList_Credit") + '<--only change
  Application.SumIfs( _
  Range("Invoice_list_Price"), _
  Range("Invoice_list_Debtor"), _
  Range("Debtor_list_Debtors"), _
  Range("InvoiceList_Payed"), _
  "(Custom) CREDIT")
范围(“债务人列表信用”)=Application.SumIfs(\u
范围(“发票清单价格”)_
范围(“发票清单债务人”)_
范围(“债务人名单债务人”)_
范围(“发票清单\付款”)_
“信用证”)

范围(“债务人列表信用”)=范围(“债务人列表信用”)+“您确定代码正在运行吗?典型的用法是这样的:是的,代码运行良好,只是不允许我组合2。使用“**”使其工作,谢谢,尽管Nick我已经尝试过了,但由于一些模糊的原因,它无法工作。
Range("DebtorList_Credit") = Application.SumIfs( _
Range("Invoice_list_Price"), _  
Range("Invoice_list_Debtor"), _  
Range("Debtor_list_Debtors"), _  
Range("InvoiceList_Payed"), _  
"*CREDIT*")`