number of times consective data occurs in a range of cells

  • Thread starter Thanks a lot Ralph. it worked.
  • Start date
T

Thanks a lot Ralph. it worked.

I have a thirty day worksheet with numbers entered each day form .1 to .99.
Is there any way to calulate how many times .25 was entered two days in a row.
example .25 .25 .10 .87 .25 .98 .25 .25 , in this case it would be two
times.
 
T

T. Valko

Try this array formula**:

=SUM(--(FREQUENCY(IF(rng=0.25,COLUMN(rng)),IF(rng<>0.25,COLUMN(rng)))=2))

This will only count when there are *2* consecutive instances. If you have:

..25, .25, .25,.87, .25, .98, .25, .25

The result will be 1.

If you have:

..25, .25, .25,.87, .25, .25, .25, .25

The result will be 0.

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

Biff

"Thanks a lot Ralph. it worked."
 
T

T. Valko

I don't know if they want to count when there are more than 2 consecutive
instances but just FTHOI try your formula on this data:

..25, .25, .25, .25, .33, .66

The formula returns the correct result but it's probably not what you'd
expect!

Biff
 
T

Thanks a lot Ralph. it worked.

this formula shows how many times .25 occurs. I want to know how many times
it occurs two days in a row.
 
T

Thanks a lot Ralph. it worked.

How do i enter this formula? When I put it in a cell it does not act like a
formula.
what is "rng" and "column(rng)?
 
T

Thanks a lot Ralph. it worked.

I would like .25 .25 .99 .66 .25 .55 .25 .25 to show equals 2. thats how many
times .25 happens in a row
 
T

T. Valko

rng is your actual range of cells. Like A1:J1 or whatever. I assumed your
range was in a row since that's how you posted it. If your actual range is
in a column replace every instance of COLUMN in the formula with ROW.

Enter the formula as an array. That is, type the formula then use the key
combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL
key and the SHIFT key then hit ENTER.

Biff

"Thanks a lot Ralph. it worked."
 
T

T. Valko

My formula does exactly what you want.

No it doesn't.

Try it on this data:

..25, .25, .25, .25, .33, .66

Depending on what the OP wants the result should be either 2 or 0. Your
formula returns 3.

Biff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top