Please help with Formula

NeoSez

Board Regular
Joined
Aug 14, 2020
Messages
246
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I was given this formula but it doesn't seem to count properly. It's supposed to count all the tickets for each company. Can someone see what I am missing? Thank you.

Excel Formula:
=IF($B$1="All",COUNTIFS(Tickets!$F:$F,$A3,Tickets!$B:$B,">"&TODAY()-$J$2),
IF($B$1="OPEN",COUNTIFS(Tickets!$F:$F,$A3,Tickets!$C:$C,"OPEN",Tickets!$B:$B,">"&TODAY()-$J$2)+COUNTIFS(Tickets!$F:$F,$A3,Tickets!$C:$C,"IN PROGRESS",Tickets!$B:$B,">"&TODAY()-$J$2),
COUNTIFS(Tickets!$F:$F,$A3,Tickets!$C:$C,"Closed",Tickets!$B:$B,">"&TODAY()-$J$2)))

Tickets!$F:$F = Name of Company, (which is also $A3 on current sheet)

Tickets!$B:$B = Date Ticket Opened

Tickets!$C:$C = Status (Open, In Progress, Closed)

$J$2 = Number of Days being calculated. For this purpose, we are calculating up to 365 days.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
but it doesn't seem to count properly.
For the sample data I have tried (very small) it seems to count correctly.
Could you give a small set of dummy sample data (preferably with XL2BB so we can copy for testing) where it is not counting properly and explain in relation to that sample?
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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