SUMIF while Excluding the values found within a range of cells

dbarbella

New Member
Joined
Jun 6, 2017
Messages
32
Hi all,
This one may be hard to explain, but I'll do my best.

Via the table below.
I need to:
  1. Sum hours
  2. Where Job # (c2:c9) = E2
  3. Except When Code # (d2:d9) = any value listed in "Exclude these code" (f2:f9)

Answer would be 5, as only B9 is going to meet the criteria

I know I can use a <> as part of the criteria in this example because I am only excluding 2 values. but the real example can have many values, and I would like for users to be able to enter values into a column and have the formula automatically pull from that column and exclude whatever values are in there.

For a variety of reasons, need to do this as a formula, and NOT VBA

So the unique thing here, is specifying a range of cells to use for a <> exclusion criteria, instead of putting each value manually into the formula as a bunch of <>'s

ABCDEF
1HoursJob #Code #Reference JobExclude these codes
25job-1code-1job-2code-2
35job-2code-2code-3
45job-3code-2
55job-1code-3
65job-2code-3
75job-3code-4
85job-1code-4
95job-2code-5

<tbody>
</tbody>


Is there hope in solving this challenge?
Crossing fingers :>

Thanks all
-Dave
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,215,040
Messages
6,122,806
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top