PDA

View Full Version : Sum using match feature with multiple criteria



Melinda
05-01-2007, 01:31 PM
I would like to write a function for Column P that sums each employees payroll(from the payroll sheet using the (1) SSN AND (2) FUND number to match) from the start date indicated in the "Good Data" sheet and continuing for the number of payperiods(PPDs) indicated.

I was supply a function by the VBA Express Forum that works great until an employee is paid from two different funds.

For example, Malcolm E Corbett is paid $25.00 from J677R, $1,091.40 from J677C(Active) for the time frame of 10/01/06-06/01/07, $1,942.40 from J677X and $242.32 from J677C(Nonactive) for the time frame of 06/02/06 - 09/01/06.

Also, Chad Johnson is paid $229.90 from J677S and $242.32 from J677C(Nonactive).

Thanks for all the help that everyone has given me. I want to Thank you in advance for the help.:doh:

Bob Phillips
05-01-2007, 03:26 PM
Q3: =SUMPRODUCT((Payroll!$E$1:$AG$1>='Good Data'!$N3)*(Payroll!$E$1:$AG$1