How to subtract when a specific text is used.

fmorenojr

New Member
Joined
Jun 22, 2023
Messages
15
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am trying to figure out how to subtract if the status was changed to 'Release", "Resigned", and "Not in Class". looking at the picture below, when a "LOC" is assigned, its calculated to the right. (Blue Square: =SUM(J21:J34)) (Green Square: =SUM(J14:J17)). Using the pic below there are 3 agents, the totals show 3, if the status shows "Released", "Resigned", and "Not in Class" then it would subtract. With those it should subtract 2 and now leaves only 1. Hopefully this makes sense.

The formula for each location is done as follows: =COUNTIF('Roll Call (CC-BOS)'!D4:D23,"019 - Call Center (*******)")




1698159826643.png
 
Is all the data on the second sheet? Otherwise, just add in the sheet names before the ranges like this:

Excel Formula:
=COUNTIFS('Roll Call (STOREFRONT-VEC)'!D4:D23,"02 - Storefront (****)",'Roll Call (STOREFRONT-VEC)'!H4:H23,"<>Released",'Roll Call (STOREFRONT-VEC)'!H4:H23,"<>Resigned",'Roll Call (STOREFRONT-VEC)'!H4:H23,"<>Not in Class")
this worked. Thank you! 4 thumbs up for you!!
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,223,270
Messages
6,171,102
Members
452,379
Latest member
IainTru

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