Question Locked

Conditional Sum

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have two worksheets that cross reference each other using a unique employee number. Worksheet A might have multiple records of the same employee number. I have to match up the employee number first and then I need to add the columns if the employee numbers match and criteria =1. The formula I'm using is:
=IF(ISNA(MATCH($C4,WorksheetA!$C$2:$C$100,0)),"0.00",SUMIF(WorksheetA!$A$2:$A$100,1,WorksheetA!$G$2:$G100))

where C4 (worksheetB)= Emp No
C2:C100 = Emp No
A2:A100 = column with "1"
G2:G100 = summed column if Emp No match and =1

But the results total all records, not just the ones that match employee number.
Thanks in advance for your help.

1 reply

This discussion is closed to new replies.