View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MartinW[_2_] MartinW[_2_] is offline
external usenet poster
 
Posts: 168
Default calculating cells

Hi Stuart,

With your sample data in A1 to F4, try this

In B7 put E2
In B8 put PG1

Then put this formula in C7
=SUMPRODUCT(--($B$2:$B$4=$B7)*(C$2:C$4))

Now grab the fill handle and drag it across to F7
Release the fill handle, then grab it again and drag down to F8

Now put this in G7
=SUM(C7:F7)
grab the fill handle and drag it down to G8

See how it works and apply the same principle to your full data.

HTH
Martin


"Stuart" wrote in message
...
2009
Title Grade QTR 1 QTR 2 QTR 3 QTR 4
MAINTAINCE E2 5000 2500 1000 500
DEISGN PG1 2500 4000 3600 1500
ESTIMATING E2 1200 1200 1000 1200

This is a example of how the table looks. am trying to see if possible
that
a formula can look up the grade coloumn and select the approiate and then
for
that grade add up all the total manhours ignoring the rest of the manhours