Forum Discussion

CTorre88's avatar
CTorre88
Copper Contributor
Aug 22, 2024
Solved

Trouble using WorksheetFunction SUM and COUNTIFS together

I'm trying to write a small vba where I need to check two conditions and if they the conditions are met add total the number of records that meet the conditions.  My code is as follows:    wsActive...
  • HansVogelaar's avatar
    HansVogelaar
    Aug 22, 2024

    CTorre88 

    How about

     

    wsActive.Range("D3").Value = Evaluate("=SUM(COUNTIFS(" & Range("K:K").Address(External:=True) & ", ""<6"", " & Range("I:I").Address(External:=True) & ", {""Open"", ""Under Investigation"", ""Acknowledge & Close""}))")

Resources