View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
smartin smartin is offline
external usenet poster
 
Posts: 915
Default Formula question

Cook wrote:
Ok... I am creating a sheet that is going to help with billing. The
problem is that for the same job we have to bill to two different "unit
codes". So I have a table that has the "job operation" the associated
"bill amount" and the associated "unit code". Can I use this table to
sum up all "RTENG" codes in cell G13 and all "EMISC" codes in cell G14?

Does that makes sense?

Thanks


Hi Cook

If you want in-place summary info like this you can try one of the two
formulas following.

With your fields in columns A, B, and C, respectively, the sum of bill
amount for all RTENG unit codes is

=SUMIF(C:C,"RTENG")

But maybe you really need to sum only within a single job operation?
This is different because you need to match two conditions:

=SUMPRODUCT(--(A1:A99=A13),--(C1:C99="RTENG"),(B1:B99))

Where 99 is a reasonably high number that will capture all the rows of
your data.

Another way is to obtain the summary information using a pivot table.
Select all your data, start the pivot table wizard, put unit code in the
row or column area, put bill amount in the data area, and optionally put
job operation in the row or column area. With bill amount (the data
field) set to sum, you are done.