#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default Counting Occurances

I really need some help for work. I have a column that contains various
numeric values and I want to count the number of times it changes from one
value to another, but there are spaces in between the cells. Heres a simple
example,
8
8
8
15
15
18
17
17
8
3
17
15
So, is there a formula or macro, something that can sum up the number of
times the number changes?
I would really appreciate the help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Counting Occurances

Try this entered as an array formula with Ctrl-Shift-Enter

List is from A1 to A12

=SUM(IF(ISNUMBER(A1:A12),IF(A1:A12<A2:A13,1,0),0) )-1

With your data I got an answer of 7 ... is this correct?

HTH

"Rusty" wrote:

I really need some help for work. I have a column that contains various
numeric values and I want to count the number of times it changes from one
value to another, but there are spaces in between the cells. Heres a simple
example,
8
8
8
15
15
18
17
17
8
3
17
15
So, is there a formula or macro, something that can sum up the number of
times the number changes?
I would really appreciate the help.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Counting Occurances

Please only post to one NG. Thank you!

"Toppers" wrote:

Try this entered as an array formula with Ctrl-Shift-Enter

List is from A1 to A12

=SUM(IF(ISNUMBER(A1:A12),IF(A1:A12<A2:A13,1,0),0) )-1

With your data I got an answer of 7 ... is this correct?

HTH

"Rusty" wrote:

I really need some help for work. I have a column that contains various
numeric values and I want to count the number of times it changes from one
value to another, but there are spaces in between the cells. Heres a simple
example,
8
8
8
15
15
18
17
17
8
3
17
15
So, is there a formula or macro, something that can sum up the number of
times the number changes?
I would really appreciate the help.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Counting Occurances

=SUMPRODUCT(--((A2:A12)-(A1:A11)<0))-1

"Rusty" wrote:

I really need some help for work. I have a column that contains various
numeric values and I want to count the number of times it changes from one
value to another, but there are spaces in between the cells. Heres a simple
example,
8
8
8
15
15
18
17
17
8
3
17
15
So, is there a formula or macro, something that can sum up the number of
times the number changes?
I would really appreciate the help.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default Counting Occurances

Sorry about the multiple posts. How do I get this array to work when there
are spaces in between the rows. Example,
8

9

10

10

11

2


"Toppers" wrote:

Please only post to one NG. Thank you!

"Toppers" wrote:

Try this entered as an array formula with Ctrl-Shift-Enter

List is from A1 to A12

=SUM(IF(ISNUMBER(A1:A12),IF(A1:A12<A2:A13,1,0),0) )-1

With your data I got an answer of 7 ... is this correct?

HTH

"Rusty" wrote:

I really need some help for work. I have a column that contains various
numeric values and I want to count the number of times it changes from one
value to another, but there are spaces in between the cells. Heres a simple
example,
8
8
8
15
15
18
17
17
8
3
17
15
So, is there a formula or macro, something that can sum up the number of
times the number changes?
I would really appreciate the help.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Counting Occurances

=SUMPRODUCT(--((A3:A13)-(A1:A11)<0))-1
Works if there are no zeroes.

"Rusty" wrote:

Sorry about the multiple posts. How do I get this array to work when there
are spaces in between the rows. Example,
8

9

10

10

11

2


"Toppers" wrote:

Please only post to one NG. Thank you!

"Toppers" wrote:

Try this entered as an array formula with Ctrl-Shift-Enter

List is from A1 to A12

=SUM(IF(ISNUMBER(A1:A12),IF(A1:A12<A2:A13,1,0),0) )-1

With your data I got an answer of 7 ... is this correct?

HTH

"Rusty" wrote:

I really need some help for work. I have a column that contains various
numeric values and I want to count the number of times it changes from one
value to another, but there are spaces in between the cells. Heres a simple
example,
8
8
8
15
15
18
17
17
8
3
17
15
So, is there a formula or macro, something that can sum up the number of
times the number changes?
I would really appreciate the help.

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 occurances SR89 Excel Worksheet Functions 6 June 28th 06 01:46 AM
Counting 22 countries in one formula DKerr Excel Discussion (Misc queries) 8 February 22nd 06 04:59 PM
Counting Date Occurances JerryBS Excel Worksheet Functions 1 March 6th 05 07:29 PM
Counting multiple occurances of a specific string BaseballFan Excel Worksheet Functions 1 February 26th 05 08:34 PM
Counting... Patrick G Excel Worksheet Functions 3 February 23rd 05 10:05 PM


All times are GMT +1. The time now is 09:32 AM.

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

About Us

"It's about Microsoft Excel"