Count Continuous data between cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Lloyd,

I'm not understanding what the question is can you be more specific.

Mike
 
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
 
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
 
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
 
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
 
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
 
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
 

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

Back
Top