Can COUNTIFS or COUNTIF count the number of rows based on the comparison between two date columns?
I simply just want to know the number of rows where the SD is greater than TD. The formula is actually what I got from Smartsheet's AI assistant. I think it makes sense and there is no error message, but it does not return with the correct value. So, I wonder if anyone has a solution to this?
Both SD and TD columns are set as date, HD is text/number.
Answers

Hi @Xiaopeng,
I'm not sure you can get a count by comparing the columns in that manner  someone else can weigh in if that's not the case.
One way to accomplish this would be to create a helper column that counts each row individually and then sum that column in your "HD" column.
The helper column formula would look like this: =COUNTIF(SD@row, > TD@row)
The formula in HD would look like this: =SUM([Count (helper)]:[Count (helper)])
Hope this helps,
Dave

Thanks @DKazatsky2. Yes, a helper column may help as a workaround.
Above question is a simplified case so everyone can understand. I still wonder if there is a way to run argument based on comparison of two columns in COUNTIF or COUNTIFS.
Help Article Resources
Categories
 All Categories
 14 Welcome to the Community
 Smartsheet Customer Resources
 62.1K Get Help
 349 Global Discussions
 198 Industry Talk
 427 Announcements
 4.4K Ideas & Feature Requests
 133 Brandfolder
 127 Just for fun
 127 Community Job Board
 455 Show & Tell
 28 Member Spotlight
 1 SmartStories
 283 Events
 36 Webinars
 7.3K Forum Archives
Check out the Formula Handbook template!