Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
AriBari
 
Posts: n/a
Default Count # of cells b/w cells ...


Hello,

I have the following data in a column: 7 0 0 0 7 0 0 0 0 0 7 0 0 7 0 0
0 0 0 0 0 7 etc.
The number of zero's between the 7's is random. I want a formula that
would count the number of zeros between the 7's.

Thanks,
Ari Bari


--
AriBari
------------------------------------------------------------------------
AriBari's Profile: http://www.excelforum.com/member.php...o&userid=25043
View this thread: http://www.excelforum.com/showthread...hreadid=388069

  #2   Report Post  
Morrigan
 
Posts: n/a
Default


Assume A5:A20 is the data, try this:

B5 = A5+B4 (copy formula down)

Now make a table with 2 columns. First column will be 7, 14, 21, 28,
35, etc. and second column will be:

COUNTIF(B5:B20,<First column)-1


Hope this helps.



AriBari Wrote:
Hello,

I have the following data in a column: 7 0 0 0 7 0 0 0 0 0 7 0 0 7 0 0
0 0 0 0 0 7 etc.
The number of zero's between the 7's is random. I want a formula that
would count the number of zeros between the 7's.

Thanks,
Ari Bari



--
Morrigan
------------------------------------------------------------------------
Morrigan's Profile: http://www.excelforum.com/member.php...fo&userid=7094
View this thread: http://www.excelforum.com/showthread...hreadid=388069

  #3   Report Post  
AriBari
 
Posts: n/a
Default


Thanks, Morrigan - it worked.

I came across a new problem. Let's say I have two columns.
Column A: AAABBCAABBCCCABC etc.
Column B: 00000001111111222 etc.

The numbering increases when the series starts repeating in column A.

I only want to count the A's, B's etc for the same number in column B.

I know I can easily do it with a Pivot table, but I would like to try
avoid that.

Thanks again,
Ari Bari


--
AriBari
------------------------------------------------------------------------
AriBari's Profile: http://www.excelforum.com/member.php...o&userid=25043
View this thread: http://www.excelforum.com/showthread...hreadid=388069

  #4   Report Post  
Morrigan
 
Posts: n/a
Default


Assume Column A1:A20 & B1:B20 is your data, make a helper column C:

C = CONCATENATE(A,B)

Now make a table of the side again with 4 Columns, headers will be:
E1 = A
F1 = B
G1 = C

D2:D## will be 0, 1, 2, 3, 4, etc.

E2 = COUNTIF($C$1:$C$20,CONCATENATE(E$1,$D2)) (Copy across and
down)


Hope it helps.



AriBari Wrote:
Thanks, Morrigan - it worked.

I came across a new problem. Let's say I have two columns.
Column A: AAABBCAABBCCCABC etc.
Column B: 00000001111111222 etc.

The numbering increases when the series starts repeating in column A.

I only want to count the A's, B's etc for the same number in column B.

I know I can easily do it with a Pivot table, but I would like to try
avoid that.

Thanks again,
Ari Bari



--
Morrigan
------------------------------------------------------------------------
Morrigan's Profile: http://www.excelforum.com/member.php...fo&userid=7094
View this thread: http://www.excelforum.com/showthread...hreadid=388069

  #5   Report Post  
AriBari
 
Posts: n/a
Default


Hello Morrigan,

Again, i worked. In the meantime I found an advice in the "Sumif and
countif" posting and came up with a sumproduct formula. if my column a
and b as before, and criteria in column c and row 4, I put this formula
in cell c6:

=SUMPRODUCT(($a$1:$a$3500 =$c5)*($b$5:$b$3500 = d$4))

across and down


Thanks,
Ari Bari


--
AriBari
------------------------------------------------------------------------
AriBari's Profile: http://www.excelforum.com/member.php...o&userid=25043
View this thread: http://www.excelforum.com/showthread...hreadid=388069



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 cells with length not equal to 7 cottage6 Excel Worksheet Functions 6 April 7th 05 09:04 PM
count cells that have *text1* and don't have *text2* amntre Excel Discussion (Misc queries) 1 April 6th 05 12:50 PM
Count cells in a column that contain dates Cachod1 New Users to Excel 1 March 29th 05 08:56 PM
Count cells in one range based on parameters in another range dave roth Excel Worksheet Functions 2 March 29th 05 05:33 PM
How do I count shaded cells Randy Excel Worksheet Functions 19 February 3rd 05 11:35 PM


All times are GMT +1. The time now is 07:40 AM.

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"