Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Check every 3 rows to see if a text value is in it?

I have column A and every 3 rows I want to check to see if the value "Fail" exists in there.

I have this, but I need to figure out the function to set the range to every 3 rows to check for the value:

=IF(ISNUMBER(SEARCH(A2:A4,"Fail")),"Fail","Pass")

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

the A2:A4 is the 3 row range that I need to check every segment (e.g. A5:A7, A8:A10). If any one of the 3 cells in that range has the word "Fail" then I need to label all three cells in the formula column "Fail"

any ideas?

>Solution :

Something like this with COUNTIFS, INDEX, and MOD:

=IF(COUNTIFS(INDEX(A:A,ROW()-MOD(ROW()+1,3)):INDEX(A:A,ROW()+2-MOD(ROW()+1,3)),"Fail"),"Fail","Pass")

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading