Just experiment with one or two formulas in one or two of the source data range cells. You should be able to deduce this on your own, with just a minimum of experimentation. If, after trying out different approaches, you still have trouble, tell us about it, and someone will then be more than willing to help guide you in the right direction.