Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-20-2018, 12:03 AM
xor xor is offline need help in counting the number of rows that contain 5 consecutive X Windows 10 need help in counting the number of rows that contain 5 consecutive X Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,103
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

In the formula in your first post you used:

=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)) and in the formula in the most recent file:

SUM(IF(FREQUENCY(IF(ISNUMBER(SEARCH("X",$A1:$G1)), COLUMN($A1:$G1)-COLUMN($A1)+1),IF(ISERROR(SEARCH("X",$A1:$G1)),COLUMN($A1:$G1)-COLUMN($A1)+1))>=5,1))



Another possibility is the somewhat shorter formula:

=--(MAX(FREQUENCY(IF(ISNUMBER(SEARCH("X",$A1:$G1)),CO LUMN($A1:$G1)),IF(NOT(ISNUMBER(SEARCH("X",$A1:$G1) )),COLUMN($A1:$G1))))>=5)
Reply With Quote
  #2  
Old 11-20-2018, 04:04 AM
Marcia's Avatar
Marcia Marcia is offline need help in counting the number of rows that contain 5 consecutive X Windows 7 32bit need help in counting the number of rows that contain 5 consecutive X Office 2007
Expert
need help in counting the number of rows that contain 5 consecutive X
 
Join Date: May 2018
Location: Philippines
Posts: 554
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Thanks Xor, I adopted the shorter formula. Until now I could not make may brain cells to understand the two minuses before the formula. I came across the same functions when counting values in a range except blanks containing formulae. Also, I erroneously thought IFERROR and IF(ERROR) work the same.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
need help in counting the number of rows that contain 5 consecutive X how to copy different text from word into excel on consecutive rows mihnea96 Word VBA 4 05-08-2017 12:09 PM
Counting Consecutive Periods In Rows Using Numbers Yaaseen23 Excel 18 03-24-2017 11:15 AM
need help in counting the number of rows that contain 5 consecutive X Counting rows with a macro? Jennifer Murphy Word Tables 1 08-23-2016 03:00 PM
need help in counting the number of rows that contain 5 consecutive X Counting table rows in a page RavenSuzumiya Word Tables 1 06-09-2016 03:38 PM
need help in counting the number of rows that contain 5 consecutive X Problem with consecutive Figure number placements Ian A King Word 2 05-11-2015 10:13 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:33 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft