Long formulas for totals

  • Thread starter Thread starter Corkey
  • Start date Start date
C

Corkey

In another pickle and need some help if you please.

Have columns for our HR to track vacation, personal, holiday, etc. Since
each day could be a different code, can someone help me with the if, else
formula. Can’t seem to get what I need. Can get it for one cell but not the
rest.

Example:

Code hours
H 8.00
V 5.00
S 3.00

Total H
Total V
Total S

Want the formula to be if code = H than add hours to Total H, if code = V,
add to total value V, and so on.

I have all the rest automated but am stuck in this pickle…. Help……… Thanks
everyone!
 
You need the SUMIF function:

=SUMIF(code_range,"H",hours_range)
=SUMIF(code_range,"V",hours_range)
=SUMIF(code_range,"S",hours_range)

where code_range might be A$2:A$50, and hours_range might be B$2:B$50
from your example.

Hope this helps.

Pete
 
Back
Top