Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 15
Question Count "how many in a row"

Is there anything I can do to get a cell to show how many times the same data is entered.

Example
1 A
2 B
3 B
4 B
5 A
6 B
7 A
8 A

Can I get something that will return the following:
A = 3
B = 2

Because B has come up 3 times in sucession (2-4) while A has only come up twice in sucession (7-8).
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=SUMPRODUCT(--(A1:A7=A2:A8),--(A1:A7="B"))+(COUNTIF(A1:A8,"B")0)

--
HTH

Bob Phillips

"TeddyTash" wrote in message
...

Is there anything I can do to get a cell to show how many times the same
data is entered.

Example
1 A
2 B
3 B
4 B
5 A
6 B
7 A
8 A

Can I get something that will return the following:
A = 3
B = 2

Because B has come up 3 times in sucession (2-4) while A has only come
up twice in sucession (7-8).


--
TeddyTash



  #3   Report Post  
Anirudh
 
Posts: n/a
Default

Hi teddy,

Use Pivot table

"TeddyTash" wrote:


Is there anything I can do to get a cell to show how many times the same
data is entered.

Example
1 A
2 B
3 B
4 B
5 A
6 B
7 A
8 A

Can I get something that will return the following:
A = 3
B = 2

Because B has come up 3 times in sucession (2-4) while A has only come
up twice in sucession (7-8).


--
TeddyTash

  #4   Report Post  
Domenic
 
Posts: n/a
Default

Assuming that Column A contains your data, try the following...

B1: enter the number 1

B2, copied down:

=IF(A2=A1,B1+1,1)

D1: enter A

D2: enter B

E1, copied down:

=MAX(IF($A$1:$A$8=D1,$B$1:$B$8))

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

In article ,
TeddyTash wrote:

Is there anything I can do to get a cell to show how many times the same
data is entered.

Example
1 A
2 B
3 B
4 B
5 A
6 B
7 A
8 A

Can I get something that will return the following:
A = 3
B = 2

Because B has come up 3 times in sucession (2-4) while A has only come
up twice in sucession (7-8).

  #5   Report Post  
Junior Member
 
Posts: 15
Default

Domenic,

Tried your solution first, made my head go a bit fuzzy, but it worked... thank you, much appreciated.

And to Anirudh & Bob Phillips thanks for you advice, didn't get to try it out, but thank you for responding!

~Teddy
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 Position of Filtered TEXT cells in a column Sam via OfficeKB.com Excel Worksheet Functions 8 May 18th 05 04:23 AM
Count Position of Filtered TEXT cells in a column Sam via OfficeKB.com Excel Worksheet Functions 0 May 15th 05 08:14 PM
Match Last Occurrence of two numbers and Count to Previous Occurence Sam via OfficeKB.com Excel Worksheet Functions 33 April 4th 05 02:17 PM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
SUMPRODUCT Formula to Count Row of data Below Matched Criteria Sam via OfficeKB.com Excel Worksheet Functions 8 February 3rd 05 01:37 AM


All times are GMT +1. The time now is 08:11 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"