我正在使用宏来总结特定债务人的价值。它目前工作正常,但我需要添加另一个标准;
Range("DebtorList_Payed")=Application.SumIf(Range("InvoiceList_Table_ItmCode"), _
Range("Debtor_list_Debtors"), Range("InvoiceList_Price"))
我在发票列表工作表上有另一个范围,称为 Range("InvoiceList_Payed") 在这一行中有“CASH”、“CREDIT”、“(Custom) CASH”和“(Custom) CREDIT”。
“CASH”和“(Custom) CASH”行中的文本为绿色,“CREDIT”和“(Custom) CREDIT”行中的文本为红色
使用现有的宏,我只需要对相应 Range("InvoiceList_Payed") 中文本颜色为绿色的行求和,
所以像;
Range("DebtorList_Payed")=Application.SumIf(Range("InvoiceList_Table_ItmCode"), _
Range("Debtor_list_Debtors"), Range("InvoiceList_Price") = _
Range("InvoiceList_Payed")> "Green"))