Match 2 parameters then sum
Posted on 2011-03-04
I have 4 columns, Column A is "Customer Name", column B is "Invoice Date", Column C is "Invoice Amount" and column D is "Status"
In cell G1 I have a user selected Customer Name. In cell H1 i have user selected month/year.(Jan-11,Feb-11,etc.).
I would like the output of this formula to be placed in I1 and the logic is as follows:
If Company name Matches user selection, and invoice date is on the same month as the user selection, and invoice status is NOT rejected, return the sum of invoiced dollars for that business for that month.
Can the above be done with VBA?