Countifs ...

OlivierS

New Member
Joined
May 29, 2014
Messages
28
Hello,

I would like to count the number of rows where the column H match the value of my column B3, the closed date (column G) is not empty, and the closed date (column G) is greater than today minus 7 days (e.g. older than a week)

I've tried this one ... but - of course - it failed

countIFS(SFDC!H:H, "=" $B3,SFDC!G:G, ISEMPTY, SFDC!G:G, ">=" TODAY-7)

Help is greatly appreciated!

Thank you all.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Ok, looks like I've managed to do it: =COUNTIFS(SFDC!H:H,B3,SFDC!G:G, "<>"&"*",SFDC!G:G,"<"&TODAY()-7)
 
Upvote 0
Ok, looks like I've managed to do it: =COUNTIFS(SFDC!H:H,B3,SFDC!G:G, "<>"&"*",SFDC!G:G,"<"&TODAY()-7)
Glad you got your head around the syntax and got it working, but I think you'll find the new and old formulas are doing different things. Just make sure that it is in fact giving the desired result.

The old one basically says " If sheet SFDC column G ISEMPTY"
The new one says "If sheet SFDC column G "<>" (is NOT empty)"
I am also a little confused where the "*" wildcard comes in as well but hey, if it works it works :)
 
Upvote 0
@Fishboy

If you have Column G <> (is not) "*" (anything), then it has to be blank, no ?
Actually that is correct, however "<>" is the opposite of ="" so you could just have

=COUNTIFS(SFDC!H:H,B3,SFDC!G:G,"<>",SFDC!G:G,"<"&TODAY()-7)
 
Upvote 0
Actually, since your last criteria is G > = today-7, or even G < Today-7<today-1
Then there is no need at all to test if G is empty or not.
If G is empty, it therefor cannot satisfy a > or < comparison to a date/number value
So you only need
=COUNTIFS(SFDC!H:H,B3,SFDC!G:G,">="&TODAY()-7)
and/or
=COUNTIFS(SFDC!H:H,B3,SFDC!G:G,"<"&TODAY()-7)

Blanks will not be counted as either less or greater or equal to any numeric/date value.
</today-1
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,514
Messages
6,125,272
Members
449,219
Latest member
daynle

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