# Excel - make a sum with some criterias [duplicate]

• -----A ------B------------C
• 1||Name ||31-03-13 ||1-04-13
• 2||test1 ||>>>> 150 ||>>>> 10
• 3||test2 ||>>>> 750 ||>>>> 11
• 4||test3 ||>>>> 800 ||>>>> 12
• 5||test3 ||>>>> 900 ||>>>> 13

I want write in a cell the date, in another cell the name and sum the values

Ex: Name: test3 Date: 31-03-13 And it should sum 800+900.

Someone can help me?

• Posting a screenshot of an Excel sheet with the data entered, with Cell locators visible (like A1, G6, etc), might help provide a better answer here.
– Nick
Sep 12, 2013 at 15:48
• I can't.... is my 1st post.... :( Sep 12, 2013 at 16:16

Given a data setup like this:

The formula in cell G2 and copied down is:

``````=IF(OR(E2="",F2="",COUNTIF(\$B\$1:\$C\$1,F2)=0),"",SUMIF(\$A\$2:\$A\$5,E2,INDEX(\$B\$2:\$C\$5,0,MATCH(F2,\$B\$1:\$C\$1,0))))
``````

Alternately, you could use a pivot table.

• Many many thanks!!!! Is exactly that I need! Cheers! Sep 13, 2013 at 7:25

You need SUMIF.

Try something like `=SUMIF(A1:A5, "=test3", B1:B5)`

• I have done like that, but is giving some problems with the range. I would only select the date and I would not "forced" to put the range manualy Sep 12, 2013 at 19:20