A COUNTIFS conundrum

HelpNeeded47

New Member
Joined
Aug 9, 2022
Messages
7
Office Version
  1. 365
Hello Wise Excel Users,

I am in desperate need of your help, to both fix a shoddy bit of formula writing and put a stop the abuse my desk is receiving because of the trouble this is causing me.

The purpose of the code is to count items have been 'closed' today.

So say if Worker A has closed 2 items today I'd like a counter to show next to their name.

Currently I have it written as =COUNTIFS(L:L,"*Closed*",K:K,"*Worker A*",M:M,TODAY())

This is returning a nil count although items have been closed.

I'd be very grateful if someone can crack this for me.

All the best,
Village Idiot
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Are you sure there is no time part included in column M?
 
Upvote 0
Can you post a small sample with dummy data with XL2BB? Columns K:M only
 
Upvote 0
Can you post a small sample with dummy data with XL2BB? Columns K:M only
I'm not able to use XL2BB, but I've attached images of a similar table. I'm also using a lists (image 2) sheet to utilise drop downs.

Sorry if this isn't a worthwhile substitution for XL2BB.
 

Attachments

  • 1660044275998.png
    1660044275998.png
    4.4 KB · Views: 23
  • 1660044356797.png
    1660044356797.png
    2 KB · Views: 11
Upvote 0
Well, your dates are left-aligned which might indicate text values, but seems to work anyway - provided you have the worker name correct.

22 08 09.xlsm
KLMNO
1
2AClosed9-Aug2
3AClosed9-Aug
4AOpen
5
Sheet2 (4)
Cell Formulas
RangeFormula
O2O2=COUNTIFS(L:L,"*Closed*",K:K,"*A*",M:M,TODAY())


If you select one of those date cells, what do you see in the formula bar?

1660045167018.png
 
Upvote 0
Solution
Well, your dates are left-aligned which might indicate text values, but seems to work anyway - provided you have the worker name correct.

22 08 09.xlsm
KLMNO
1
2AClosed9-Aug2
3AClosed9-Aug
4AOpen
5
Sheet2 (4)
Cell Formulas
RangeFormula
O2O2=COUNTIFS(L:L,"*Closed*",K:K,"*A*",M:M,TODAY())


If you select one of those date cells, what do you see in the formula bar?

View attachment 71176
Thank you Peter. This works! As a secondary question - is there a way of having the count show in one cell for each worker?

For example it'd show A 2; B 3; C 0 all in one cell.

Appreciate your help!
 
Upvote 0
Thank you Peter. This works!
Hmm, it was just your original formula but with a changed worker name. providing your worker name was correct it should have worked for you from the beginning.

Two other comments
  • I would recommend not using whole column references in these formulas. Just use enough rows to be sure of including all your data. below I have used down to row 100 but you can edit that up/down if required.

  • Given the small sample data that you have shown, there is no need for the asterisk wildcard characters in the formula.

is there a way of having the count show in one cell for each worker?

For example it'd show A 2; B 3; C 0 all in one cell.

Like this?

22 08 09.xlsm
KLMNO
1
2AClosed10-AugA 3; B 2; C 0
3AClosed10-Aug
4AOpen10-Aug
5BClosed10-Aug
6COpen10-Aug
7BOpen10-Aug
8AClosed9-Aug
9BClosed10-Aug
10AClosed10-Aug
11
Count
Cell Formulas
RangeFormula
O2O2=LET(u,UNIQUE(FILTER(K2:K100,K2:K100<>"")),TEXTJOIN("; ",,u&" "&COUNTIFS(L2:L100,"Closed",K2:K100,u,M2:M100,TODAY())))
 
Upvote 0
Hmm, it was just your original formula but with a changed worker name. providing your worker name was correct it should have worked for you from the beginning.

Two other comments
  • I would recommend not using whole column references in these formulas. Just use enough rows to be sure of including all your data. below I have used down to row 100 but you can edit that up/down if required.

  • Given the small sample data that you have shown, there is no need for the asterisk wildcard characters in the formula.



Like this?

22 08 09.xlsm
KLMNO
1
2AClosed10-AugA 3; B 2; C 0
3AClosed10-Aug
4AOpen10-Aug
5BClosed10-Aug
6COpen10-Aug
7BOpen10-Aug
8AClosed9-Aug
9BClosed10-Aug
10AClosed10-Aug
11
Count
Cell Formulas
RangeFormula
O2O2=LET(u,UNIQUE(FILTER(K2:K100,K2:K100<>"")),TEXTJOIN("; ",,u&" "&COUNTIFS(L2:L100,"Closed",K2:K100,u,M2:M100,TODAY())))
This is fantastic, really appreciate your help. Miles better than the solutions I had worked up myself.
Cheers
Mr K
 
Upvote 0

Forum statistics

Threads
1,223,887
Messages
6,175,199
Members
452,617
Latest member
Narendra Babu D

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