help with data-urgent

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a file which

Dept PayType Amount
2312 OT 500
reg 1000
vac 10
ss 5
2566 ot 5522
reg 42
vac 565 etc
2556 reg 10
I would like to automate the process of cumulating the
amounts. For eg: I need to sum "reg" and "ot" for "2312"
and "2556" only. I think the logic should go something
like this - look in paytype and find "reg" or "ot", if
found, move left and if dept is "blank", go up until you
get a value. Now, if that is "2312" or "2556",
sum"amount".

I am lost coding this. please help
Thanks
 
try this to sum OT for 2312
=sumproduct((a2:a200=2312)*(b2:b200="OT")*c2:c200)
in both needed use the or +
=sumproduct(((a2:a200=2312)+(a2:a200=2556))*(b2:b200="OT")*c2:c200)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top