Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Stat Guy via OfficeKB.com
 
Posts: n/a
Default Consecutive Cells

I have used various formulas on this site to count consecutive occurences
fora piece of data, but to no avail. Can someone please help? In column
"I" I have a bunch of O's and U's. I want to be able to count how many
times O appreared 3 consecutive times, 4 consecutive times etc.. up to 10.
My column run down to 162 on some pages and less on others, if this matters?
Also is there a way to do a check based on a hiearchy of variables?

--
Message posted via http://www.officekb.com
  #2   Report Post  
Harlan Grove
 
Posts: n/a
Default

"Stat Guy via OfficeKB.com" wrote...
I have used various formulas on this site to count consecutive occurences
fora piece of data, but to no avail. Can someone please help? In column
"I" I have a bunch of O's and U's. I want to be able to count how many
times O appreared 3 consecutive times, 4 consecutive times etc.. up to 10.
My column run down to 162 on some pages and less on others, if this

matters?
Also is there a way to do a check based on a hiearchy of variables?


While it may be possible to do this in a single formula, it'd be so
convoluted and inefficient that it wouldn't be worth it.

If your O's and U's were in, say, A2:A101, you could use formulas in B2:B101
to count the consecutive instances.

B2:
=IF(A3<A2,1,"")

B3:
=IF(A4<A3,ROWS(B$2:B3)-IF(COUNT(B$2:B2),
LOOKUP(2,1/ISNUMBER(B$2:B2),ROW(B$2:B2)-1),0),"")

Fill B3 down into B4:B101. Then count the number of 4 consecutive instances
of O using

=SUMPRODUCT((A2:A101="O")*(B2:B101=4))


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count Consecutive Cells Trapper via OfficeKB.com Excel Discussion (Misc queries) 6 May 24th 05 12:35 AM
Consecutive cells Trapper via OfficeKB.com Excel Worksheet Functions 4 May 23rd 05 10:28 PM
copy every 30th cell in the column into consecutive cells in anoth shortcuts Excel Worksheet Functions 2 March 29th 05 07:28 AM
How do I set up a formula to repat 5 consecutive cells in a colum. jbsand1001 Excel Worksheet Functions 2 January 7th 05 08:36 PM
How do I set up a formula to repeat 5 consecutive cells in a colum jbsand1001 Excel Worksheet Functions 1 January 7th 05 05:59 PM


All times are GMT +1. The time now is 05:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"