How to make an Excel formula which totals several adjacent rows based on cell values

microsoft-excel-2007worksheet-function

I have an Excel sheet with three columns: date, person and percentage. I would like to put in a data validation that flags cells if the total for a given data/person combination do not equal 100%. Is that possible?

In other words, in the custom formula of a data validation, I would like to make the following type of formula.

 =if(sum( cells with a (date = the date on this row, person = person on this row))=1)


Is there a function which will return the cells in a range conditioned on certain values, or will sum the cells.

Note that if it is not possible to do two cells, I have no issue adding a cell which combines both values for the purpose of affecting the lookup.

You want SUMIF (for a single criteria), the Microsoft SUMIF page on it, is pretty good. as is the OfficeArticle's SUMIF.
Or just SUM with an array function (see above article from officearticles) for multiple criteria. For instance in the sheet below I entered the formula without curly braces into G2, and helt Ctrl+Shift+Enter, then I drug the formula down.