View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Total under certain number?

for under 5 hours in D1 and D2 enter:

=MIN(SUM(IF(A2:A7="A",B2:B7)),4)
=MIN(SUM(IF(A2:A7="B",B2:B7)),4)

for over 5 hours in D3 and D4 enter:

=SUM(IF(A2:A7="A",B2:B7))-D1
=SUM(IF(A2:A7="B",B2:B7))-D2

All the above are array formulas installed by CNTRL-SHIFT-ENTER
--
Gary''s Student - gsnu200750


"Geo" wrote:

Hi,
I have a spreadsheet with data from two different units. What I would like
to do is to be able to total, for each unit, figures under a certain number
and totals for above the same number.
Example:

Unit Hours
A 2
A 2
B 3
A 4
B 1
B 1
and so on.....

Totals for: Unit Hours
Under 5 hours A 4
B 4

Over 5 hours A 4
B 1


Hope that helps!
--
Geo