Add different values that equal 1 on a row

  • Thread starter Add sum of different values
  • Start date
A

Add sum of different values

I am trying to add how many seat hours per equipment type each person has.
Which formula should I use? I've tried several and I get errors.

Example:

Crane type 3&4: how many times they have used this type of crane. I used
this formula but get 0 value instead of "3", which is the number of times in
the selection that the person used this specific type of equipment.

=SUMIF(D6:D41,"if(d6:d41{=3},{=4},1")

I am trying to assign a value of 1 to each cell that has a 3 or a 4 in it in
that specific range, so that when I add the range it will calculate how many
times they used either crane #3 or crane #4.

Thanks
 
S

Sandy Mann

Try:

=SUMPRODUCT(--(D6:D41={3,4}))

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk


"Add sum of different values" <Add sum of different
(e-mail address removed)> wrote in message
news:[email protected]...
 

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

Top