Question : How do I sum cells based on text?

Let's say I have the following

Labor code      1           2            3          4              5      mtl total    labor total
AW                               25                      45                                        70
MTL                1000                  1050                                2050

In the labor total column I need for it to calculate any other labor code except MTL.
It could be "JACK JUMPED OVER THE MOON" as long as it doesn't calculate the mtl total.  

I hope you understand. I know it's something simple.

Answer : How do I sum cells based on text?

Do you just want to sum for a single row? If so try a formula like this in H2

=IF(A2<>"MTL",SUM(B2:F2),"")

or to sum for multiple rows

=SUMPRODUCT((A2:A100<>"MTL")*B2:F100)

regards, barry

Random Solutions  
 
programming4us programming4us