Saturday, December 17, 2005

Array formula saves the day

















Three employees are sick (S) or have vacation (V) on various days in August and September.

I would like a formula to calculate the total number of sick days and vacation days for each employee for the range B4:C6.

I visited Mr Excel here and visited pages with countif in them. This page held the answer.

In B4 I typed the formula =SUM((people=$A4)*(DATA=B$3)) and pressed Ctrl+Shift+Enter as it is an array formula.

people is the range A7:A18 and DATA is B7:I18. I copied the formula to the other cells in B4:C6 and that was it!

Moral: you don't have to know a lot if you know a little and Google is not far away.

No comments: