Question : sumif with 2 conditions

Hello:
I have the following spreadsheet:
Batch NumberAccount No      Description           Project ID   Type      Amount      Journal Reference
      01-50-00      Special Membership   5725    Credit      $75.00       Sales
      01-50-00      Child Membership       5720    Credit      $25.00       Sales
      01-50-00      Renewal Membership5720    Credit      $12.50       Sales
      01-30-00      Workshop                   1580          Credit      $40.00       Sales
      01-30-00      Custom Program        1580          Credit      $6.00       Sales
      01-20-00      Prior deposit              1302           Debit      $12.35       Sales
      01-40-00      Guided Tour                    1302           Credit      $7.75       Sales
      01-40-00      Adult                   1010     Credit      $17.10       Sales
      01-40-00      Children                   1010           Credit      $11.70       Sales
      01-10-00      Cash                  Debit      $11.70       Sales Deposit
      01-10-00      American Express            Debit      $122.65       Sales Deposit
      01-20-00      Visa/MC/Discover                    Debit      $48.35           Sales Deposti
using vba I need to add the amount field if the project codes are the same and also if the type (Debit/Credit is the same.  My problem was that  with the sumif, I was able to set only one condition (it was adding when the project id was the same but it wasn't useful since it was adding Debits and Credits eg. Prior Deposit and Guided Tour which were supposed to be a different criteria.  I have to have the formula in vba. I have the following formula which did not work:
Total = Application.WorksheetFunction.SumIfs(ActiveSheet.Range("F2:F100"), ActiveSheet.Range("D2:D100"), "=", ActiveSheet.Range("E2:E100"), "=")

Any help would be appreciated

Answer : sumif with 2 conditions

Do you have the CONVERT NULL DATES TO DEFAULT option set?

Open the report
Click FILE --> REPORT OPTIONS
Is the option CONVERT DATABASE VALUES TO DEFAULT checked?

Is the database actually returning that date?

You could also suppress the value with a formula
Right click the field
Click FORMAT FIELD
Click the COMMON TAB
Click the FORMULA BUTTON to the right of suppress
{YourField} = Date(1900,1,1)

mlmcc
Random Solutions  
 
programming4us programming4us