# count the maximum number consecutive

1. ## count the maximum number consecutive

count the maximum number of consecutive "N".
In the attached file corresponds to 7 from column M to column S.
thanks

conta.zip

2. ## Re: count the maximum number consecutive

Oops, never mind

3. ## Re: count the maximum number consecutive

Try this formula, entered as an array (CNTRL SHFT + ENTER)

=MAX(FREQUENCY(IF(B2:AM2="N",COLUMN(B2:AM2)-1),IF(B2:AM2<>"N",COLUMN(B2:AM2)-1)))
Does that work for you?

4. ## Re: count the maximum number consecutive

Thanks for the answer, but does not work.
may be the Italian version of Excel.
If, please attach the file with the formula.
maybe even some other formula.
Gazie yet.

5. ## Re: count the maximum number consecutive

It might be semicolons versus commas or it may be that you didn't use CNTRL SHFT ENTER. Here's a file with the formula in it.

6. ## Re: count the maximum number consecutive

ok, with the file attached I managed to work the formula.
thanks again
If I change the forrmula:
= MAX (FREQUENCY (IF (B2: AM2 = "", COLUMN (B2: AM2) -1), IF (B2: AM2 <> "", COLUMN (B2: AM2) -1)))
and inserting it with (CNTRL SHFT + ENTER) I can not make it work does not put the curly brace.

7. ## Re: count the maximum number consecutive

Not sure why you could not get the formula to work (i.e. couldn't get the brackets). You should either get the brackets or a message box saying there's an issue with the formula. The post is marked solved. Did you figure it out after this post or run into this problem after you marked it solved?

Also, In your example your "blank" cells are not really blank. They do not contain "", they contain " ". You need to revolve your formula around that or remove the spaces.

8. ## Re: count the maximum number consecutive

@ ChemistB

Formula works great for me.

Nice one

9. ## Re: count the maximum number consecutive

Thanks Fotis We can call it Chemists Function.

10. ## Re: count the maximum number consecutive

OOOOO!! Yes i remember!

Now you have your own function, too!!

Congr!!

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1