+ Reply to Thread
Results 1 to 6 of 6

Finding consecutive numbers or dates

  1. #1
    Registered User
    Join Date
    03-06-2010
    Location
    Costa Mesa, CA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Finding consecutive numbers or dates

    I'd like to find out if Excel can locate consecutive numbers.

    For example: Column A has days of the month entered (1-31), but not necessarily every day of the month. I'd like Excel to find consecutive numbers in adjacent cells within the column; i.e., A4 has a "6" entered and A5 has a "7", and if found, sum the values in the adjacent cells in Column B.

    Then, assuming there may be more than one pair of consecutive numbers in Column A, I'd like Excel to determine which pair of consecutive numbers have the highest corresponding values in the adjacent B Column.

    Can this be done?
    Last edited by Mattieu; 04-27-2012 at 03:42 AM.

  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 or dates

    Hi

    With your numbers, starting in A1, then in B2, try this.

    =IF(A2=A1+1,A1+A2,"")

    Is this what are you looking for?
    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
    03-06-2010
    Location
    Costa Mesa, CA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Finding consecutive numbers or dates

    yes, but how do I apply it to a column with 40+ numbers so it identifies which pair(s) are consecutive numbers?
    Thanks.

  4. #4
    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 or dates

    Copy(drag down) the formula..

  5. #5
    Registered User
    Join Date
    03-06-2010
    Location
    Costa Mesa, CA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Finding consecutive numbers or dates

    Works! THanks for your help!!

  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 or dates

    You are welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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