Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 361
Default Counting Consecutive Instances

My data table is like this:

Date BOX
3-Jan 6.16%
4-Jan 5.87%
5-Jan 2.60%
8-Jan 5.89%
9-Jan 6.00%
10-Jan 6.00%
11-Jan 6.00%
12-Jan 2.00%


I am trying to add a ColumnC that will count the consecutive instances of
the value in ColB if it greater than or = 5%. Sort of like this:

Date BOX Count
3-Jan 6.16% 1
4-Jan 5.87% 2
5-Jan 2.60% 0
8-Jan 5.89% 1
9-Jan 6.00% 2
10-Jan 6.00% 3
11-Jan 6.00% 4
12-Jan 2.00% 0


Thank you in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Counting Consecutive Instances

One way:

C2: =--(B2=5%)
C3: =IF(B3<5%,0,C2+1)

Copy C3 down as far as needed


In article ,
carl wrote:

My data table is like this:

Date BOX
3-Jan 6.16%
4-Jan 5.87%
5-Jan 2.60%
8-Jan 5.89%
9-Jan 6.00%
10-Jan 6.00%
11-Jan 6.00%
12-Jan 2.00%


I am trying to add a ColumnC that will count the consecutive instances of
the value in ColB if it greater than or = 5%. Sort of like this:

Date BOX Count
3-Jan 6.16% 1
4-Jan 5.87% 2
5-Jan 2.60% 0
8-Jan 5.89% 1
9-Jan 6.00% 2
10-Jan 6.00% 3
11-Jan 6.00% 4
12-Jan 2.00% 0


Thank you in advance.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default Counting Consecutive Instances

Using your posted data
try this:

C2: =(B2=0.05)*(N(C1)+1)
copy that formula down as far as you need

Does that help?
***********
Regards,
Ron

XL2003, WinXP


"carl" wrote:

My data table is like this:

Date BOX
3-Jan 6.16%
4-Jan 5.87%
5-Jan 2.60%
8-Jan 5.89%
9-Jan 6.00%
10-Jan 6.00%
11-Jan 6.00%
12-Jan 2.00%


I am trying to add a ColumnC that will count the consecutive instances of
the value in ColB if it greater than or = 5%. Sort of like this:

Date BOX Count
3-Jan 6.16% 1
4-Jan 5.87% 2
5-Jan 2.60% 0
8-Jan 5.89% 1
9-Jan 6.00% 2
10-Jan 6.00% 3
11-Jan 6.00% 4
12-Jan 2.00% 0


Thank you in advance.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Counting Consecutive Instances

Enter this formula in C2:

=--(B2=0.05)

Enter this formula in C3 and copy down as needed:

=IF(B3=0.05,C2+1,0)

--
Biff
Microsoft Excel MVP


"carl" wrote in message
...
My data table is like this:

Date BOX
3-Jan 6.16%
4-Jan 5.87%
5-Jan 2.60%
8-Jan 5.89%
9-Jan 6.00%
10-Jan 6.00%
11-Jan 6.00%
12-Jan 2.00%


I am trying to add a ColumnC that will count the consecutive instances of
the value in ColB if it greater than or = 5%. Sort of like this:

Date BOX Count
3-Jan 6.16% 1
4-Jan 5.87% 2
5-Jan 2.60% 0
8-Jan 5.89% 1
9-Jan 6.00% 2
10-Jan 6.00% 3
11-Jan 6.00% 4
12-Jan 2.00% 0


Thank you in advance.



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
Counting instances in string John in Wembley Excel Discussion (Misc queries) 11 September 18th 07 06:51 PM
Counting instances of text??? tpmax Excel Worksheet Functions 7 June 27th 07 03:54 AM
Counting Multiple Instances Curtis Excel Worksheet Functions 3 January 31st 07 06:22 PM
Counting instances of data across worksheets Carolyn Excel Discussion (Misc queries) 1 November 8th 06 06:37 PM
Counting instances in a cell [email protected] Excel Discussion (Misc queries) 2 December 11th 04 03:14 PM


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