Using SUMIF or SUMIFS in excel sheet

2019-09-10 12:57发布

问题:

I have data in the sheet like

Emp       JID     Sumt  

1004      1001    2
1142      1001    4
1166      1001    6
1167      1001    1
1169      1001    4
1170      1030    3
1171      1031    6
1172      1031    4
1173      1041    3
1174      1041    5
1145      1030    3
1088      1012    4.1
1123      1001    1
1102      1031    4
1122      1001    4

And i trying to sum up sumt based on JID coulmn, if JID has the same id's like 1001 Sumup column Sumt data.And result should be

  JID     result         
  1001    22
  1030    6
  1031    14          
  1041    8

How do i specify in a formula? I tried using DSUM but it returns #Value error. Is the SUMIF right formula?

回答1:

SUMIF is appropriate, but a pivot table would be more versatile, updating easily when new JIDs are added



回答2:

If your records start from column "A" then the following SUMIF should work:

=SUMIF(B:B;1001;C:C)

As far as I understood, you want to sum all values from column Sumt if column JID equals 1001.