#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Countif Help

I have a column that has a series of numbers and I want to count the number
of 3s and the following number = 1.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Countif Help

if a cell contains:
333
and the following cell contains:
1

Should it be counted three times, or one time, or not at all??
--
Gary''s Student - gsnu200777


"rttg" wrote:

I have a column that has a series of numbers and I want to count the number
of 3s and the following number = 1.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Countif Help


Col A
--------
1
2
3
4
1
2
1
2
3
1
2
3
4

In this case the count would be 1. The values would on be 1, 2, 3, or 4 and
I only want to count if the value following 3 equals 1.




"Gary''s Student" wrote:

if a cell contains:
333
and the following cell contains:
1

Should it be counted three times, or one time, or not at all??
--
Gary''s Student - gsnu200777


"rttg" wrote:

I have a column that has a series of numbers and I want to count the number
of 3s and the following number = 1.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Countif Help

in B1 enter:

=IF(AND(A1=3,A2=1),1,"") and copy down

In C1 enter:

=SUM(B:B)
--
Gary''s Student - gsnu200777
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Countif Help

Give this a try...

=SUMPRODUCT((A1:A99=3)*(A2:A100=1))

Note that when expanding or contracting the above ranges, the maximum row in
the left hand expression must be one less than the maximum row in the right
hand expression (hence, the A99 and A100 being different by 1).

Rick


"rttg" wrote in message
...

Col A
--------
1
2
3
4
1
2
1
2
3
1
2
3
4

In this case the count would be 1. The values would on be 1, 2, 3, or 4
and
I only want to count if the value following 3 equals 1.




"Gary''s Student" wrote:

if a cell contains:
333
and the following cell contains:
1

Should it be counted three times, or one time, or not at all??
--
Gary''s Student - gsnu200777


"rttg" wrote:

I have a column that has a series of numbers and I want to count the
number
of 3s and the following number = 1.




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
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") sctroy Excel Discussion (Misc queries) 2 September 25th 05 04:13 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
COUNTIF Zachary Turner Excel Discussion (Misc queries) 3 May 28th 05 10:11 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM


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