View Single Post
 
Old 11-17-2018, 06:11 PM
Marcia's Avatar
Marcia Marcia is offline Windows 7 32bit Office 2007
Expert
 
Join Date: May 2018
Location: Philippines
Posts: 551
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default need help in counting the number of rows that contain 5 consecutive X

Hi. I have a sheet that contains characters combined with "X". I would like to count the number of rows that contain 5 consecutive cells with the letter "X". I found the below array formula that i think would be a jump off point for me to get the number of rows but couldn't seem to come to the correct result when I added COUNTIF before the SUM. If possible, I wouldn't need to add a helper column.
=SUM(IF(FREQUENCY(IF(ISNUMBER(SEARCH("X",$A1:$G1)) ,COLUMN($A1:$G1)-COLUMN($A1)+1),IFERROR(SEARCH("X",$A1:$G1),COLUMN( $A1:$G1)-COLUMN($A1)+1))>=5,1))


Thank you.


Um, how do I attach a screenshot in a post?
Attached Files
File Type: xlsx X file.xlsx (14.3 KB, 16 views)

Last edited by Marcia; 11-17-2018 at 08:51 PM.
Reply With Quote