Countif formula that counts that row if the date on one column matches the date on the other column?

Options
✭✭

Best Answer

• ✭✭✭✭✭✭
Answer ✓
Options

=if(count(collect(DateA:DateA, DateA:DateA, @cell - 15 >= DateB@row))>0,1,0)

Should do it. Same syntax as previously provided formula.

Answers

• ✭✭✭✭✭✭
Options

Helper column if statement that outputs a 1 if they are equal, then a countif 1 on the helper column.

• ✭✭
Options

Thank you! but how do I add it so it's in the formula?

• ✭✭✭✭✭✭
Options

=if(countif(DateA:DateA,DateB@row)>0,1,0)

Where your column names are Date A and Date B. A is the lookup column, B is the column with the value you want to check.

• ✭✭
Options

Thank you so much @L@123 ! And also how do I add on to this formula so that it counts it when it is 15 days and more?

• ✭✭✭✭✭✭
Answer ✓
Options

=if(count(collect(DateA:DateA, DateA:DateA, @cell - 15 >= DateB@row))>0,1,0)

Should do it. Same syntax as previously provided formula.

• ✭✭
Options

Thanks @L@123 ! So what I meant was how could I add that formula to my COUNTIF formula? This is my formula so far and I would like to add on to it - =COUNTIFS({Proj. Type_}, <>"OTU", {NTP}, AND(@cell >= DATE(2020, 10, 1), @cell <= DATE(2021, 9, 30)))

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!