Countifs help
I have a sheet that has a column for the date and the second column that states "yes" or "no" beside the date as to if we have had an accident. This second column is called safety. I am trying to write a formula to count the number of days since the last time I input a "yes" in the safety column. Each time I write my formula I get #unparseable. This formula works in excel but not smartsheets. How can I change it to work?
=if(countif(Safety:Safety,"yes"),Countif(index(Safety:Safety,lookup(2,1/(Safety:Safety356="yes"),row(Safety1:Safety356)))):index(Safety1:Safety356,65536),"no"),0)
Answers
-
Would this work?
=NETDAYS(MAX(COLLECT(Date:Date, Safety:Safety, ="Yes")), TODAY(-1))
-
I get an error that states #Invalid Data Type when I use the equation above
-
Is the column you're entering the formula into set to be a date data type or something other than text?
-
All columns are set to text/number for Date, Safety, and the column I am putting the formula in.
-
Okay, I think you need to have your date column set to be date type only and the others should be text/number. When I changed it to text/number for the date column, I also got an error message.
Help Article Resources
Categories
Check out the Formula Handbook template!