Hi Jeng13,
There's no real mystery behind the formula. Just one of those things you either know or you don't.
To try and explain it simply, SUMIF/SUMIFS works in a similar way to filtering data and summing a range within the results.
For example, if your data contained details of all households in Rhode Island and you had details of the relevant city in ColA and number of children in each household in ColB. If you filtered to all addresses in Lincoln and where the number of children present was great than none, summing the result of the visible rows in colB would give you your answer.
EG:
(To all you Excel pedants out there, yes I know filtering A and summing B without filtering to <>0 would give the same result. I was stuck for a decent example so let it slide!)
For this to work it relies on the ranges being of the same size (in this case, lengthwise).
So this would work:
Whereas this would not:
These ranges can be two dimensional and therefore cover more than one column as well as more than one row. As long as the ranges are the same size, they can be offset from each other.
In your example, you have employee names in every 4th column starting from colB and hour totals in every 4th column starting from colE. SO by referring to ranges from the first employee name column to the last employee name column and and equally sized sum range starting at the first hours column to the last, Excel does all the hard work and sums up just what you need.
There are FAR better explanations out there than mine so I'd suggest hunting them down if you really want to grasp how this works. A forum search of "Two dimensional SUMIF" may result in something useful. Failing that there are plenty of decent Excel websites out there to help.
Hope that helps a little.
BSB
Bookmarks