Count Continuous data between cells

L

Lloyd

Count Continuous data between cells.

Eg.

Cells
A B D E F G H I
2 2 2 4 5 2

This means I = 2 incidents

Thanks for your help
 
L

Lloyd

Hi Mike

Sorry for that. I what to count between a range how many time there is
Continuous data between A to H,so that A to D = 1 incident and G to H = 1
incident, which a total of 2 incidents. I hope I have explained thie better.

Thanks

Lloyd
 
R

Rick Rothstein \(MVP - VB\)

Assuming your range of interest is A1:H1, does this formula do what you
want?

=(COUNTA(A1:H1)>0)-(A1="")+SUMPRODUCT(--(A1:G1=""),--(B1:H1<>""))

If you need to cover more columns, the last cell in the SUMPRODUCT's first
range is always one less than the last cell in its second range.

Rick
 
L

Lloyd

Hi Rick

Thanks
I forgot I want to count how many e's , can i replace (A1="") with (A1="e").
Do it count how many occureies e is.

Thanks
 
R

Rick Rothstein \(MVP - VB\)

You are going to have to learn to provide more details when you ask
questions in newsgroups; a lot of volunteers who answer questions on
newsgroups tend to skip over highly vague questions which means you are
missing the variety of responses others are getting. Now, as to your last
question... your first post showed numerical data, so what e's are you now
talking about? Please be specific. Remember, we have **no** idea what your
spreadsheet, or the data on it, looks like.

Rick
 
L

Lloyd

Hi Rick

Sorry for not been clear, I know you are all vounteers.

I hope I explain myself better this time

In cells ABC I have letters "F" and In cells DEF I ahve letters "F"
I what to count how many times F occures in the row

EG this would = 2 because it counts ABC as One times and DEF as one time

Thanks
 
R

Rick Rothstein \(MVP - VB\)

Okay, I think this formula will do what you want...

=SUMPRODUCT(--(A1:G1="F"),--(B1:H1<>"F"))

As before, if you need to cover more columns, the last cell in the
SUMPRODUCT's first range is always one less than the last cell in its second
range.

Rick
 
Top