tags:

views:

37

answers:

2

Hi
I was wondering if there was a way I could conbine these 2 Macros as I want it to Sum Invoice_list_Price if it has either or both "(Custom) CREDIT" or "CREDIT" Criteria,
Thank You.

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")
A: 

Am I completely misunderstanding your question, or is this all you're after?

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")
Nick