+ Reply to Thread
Results 1 to 11 of 11

Finding Consecutive Numbers

  1. #1
    Registered User
    Join Date
    05-11-2012
    Location
    Chatham, Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Finding Consecutive Numbers

    Hi all,
    I am struggling to figure out an equation in excel and could use some help. I am trying, in a column of numbers to find if there is a number greater than 27, followed by a number greater than 27 again. i just need a yes or no answer for the column.
    for example:
    2,6, 17,88,28,4,55 would be yes
    1,9,33,6,7,88 would be no

    Any help would be appreciated!! thank you

  2. #2
    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: Finding Consecutive Numbers

    Hi. Welcome to the forum.

    You mean, something like this? in B1 and copy down.

    =IF(AND(A2>27,A3>27),"yes","No")

    Is this, works for you?
    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.

  3. #3
    Registered User
    Join Date
    05-11-2012
    Location
    Chatham, Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Finding Consecutive Numbers

    That didn't seem to work. Here is an example of a column of numbers i am working with F2-F25
    13
    9
    11
    9
    15
    9
    13
    19
    26
    31
    28
    31
    33
    39
    30
    35
    35
    28
    30
    30
    26
    41
    22
    17

    i need to know that if within this column, if there is a number above 27, followed by another number over 27 right after it.

  4. #4
    Registered User
    Join Date
    05-11-2012
    Location
    Chatham, Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Finding Consecutive Numbers

    i have to do this hundreds of times so i don't want to do it by hand

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Finding Consecutive Numbers

    =SUMPRODUCT((F2:F25>27)*(F3:F26>27))>0
    oughta do it if F26 is blank.
    Last edited by JosephP; 05-11-2012 at 11:33 AM.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  6. #6
    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: Finding Consecutive Numbers

    Ok. But why you say that does not works?
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Finding Consecutive Numbers

    Hi,

    an attempt

    Please Login or Register  to view this content.
    Regards
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  8. #8
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Finding Consecutive Numbers

    or
    =MAX(FREQUENCY(IF(F2:F25>27,ROW(F2:F25)),IF(F2:F25<=27,ROW(F2:F25))))>1
    entered with Ctrl+Shift+Enter

  9. #9
    Registered User
    Join Date
    05-11-2012
    Location
    Chatham, Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Finding Consecutive Numbers

    Thank you SO much JosephP the first formula you gave me works perfectly!!!
    Now i can give my brain a rest!!!

  10. #10
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Finding Consecutive Numbers

    The SUMPRODUCT versions seem to work for me......but of course in Excel 2010 you can also use COUNTIFS

    =COUNTIFS(F2:F24,">27",F3:F25,">27")>0
    Audere est facere

  11. #11
    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: Finding Consecutive Numbers

    My poor English,betrayed me, again ....

    Apologize for this...

+ 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