+ Reply to Thread
Results 1 to 10 of 10

count the maximum number consecutive

  1. #1
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    count the maximum number consecutive

    Good evening, I ask your help in formula
    count the maximum number of consecutive "N".
    In the attached file corresponds to 7 from column M to column S.
    thanks

    conta.zip

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: count the maximum number consecutive

    Oops, never mind
    Last edited by ChemistB; 07-12-2012 at 01:20 PM. Reason: Incorrect answer :(
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    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. #4
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    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. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    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.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    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.
    Last edited by Berna11; 07-12-2012 at 05:20 PM.

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    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. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: count the maximum number consecutive

    @ ChemistB

    Formula works great for me.

    Nice one
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  9. #9
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: count the maximum number consecutive

    Thanks Fotis We can call it Chemists Function.

  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: count the maximum number consecutive

    OOOOO!! Yes i remember!

    Now you have your own function, too!!

    Congr!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

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