+ Reply to Thread
Results 1 to 10 of 10

Formula to trace back to last time when numbers were at most one cell apart

  1. #1
    Registered User
    Join Date
    05-04-2018
    Location
    Hong Kong
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    69

    Formula to trace back to last time when numbers were at most one cell apart

    Dear Sir

    We have columns in an excel spreadsheet whereby some cells have numbers while also empty cells.

    We want the formula to trace back to the last time when the numbers in a column were at most one cell apart.

    There are two possible scenarios for this:

    1) there are numbers in consecutive cells; or

    2) the numbers are exactly 1 cell apart

    Please refer to the enclosed excel spreadsheet for illustration.

    Can you help us with suggesting a formula ?

    Thank you very much!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Formula to trace back to last time when numbers were at most one cell apart

    Please update your forum profile with the correct OFFICE version you are using (NOT Windows).

    I have looked at your attachment: it is not at all clear what you are trying to do. Where will I find your expected results, manually mocked up?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Formula to trace back to last time when numbers were at most one cell apart

    The expected answers are 1700 rows down!! They still don't make much sense to me, though. Why we needed to see 1700 rows when 10 or 20 would have been plenty is also a bit of a mystery.

    Lamlam... please explain exactly why 9 is your expected answer in C1760.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Formula to trace back to last time when numbers were at most one cell apart

    Yes, a smaller sample set would make this easier to follow.

  5. #5
    Registered User
    Join Date
    05-04-2018
    Location
    Hong Kong
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    69

    Re: Formula to trace back to last time when numbers were at most one cell apart

    Hi
    Please refer to the enclosed file as revised. Hope this is understandable.
    I checked this can be opened in a Window 10 computer.
    The expected result is in Row 43 in this revised file.
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Formula to trace back to last time when numbers were at most one cell apart

    Lamlam - please see post #2 where I asked you to do this:

    Please update your forum profile with the correct OFFICE version you are using (NOT Windows).
    We are not interested in your version of Windows - it is the version of Office you need to show. What is that?

  7. #7
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Formula to trace back to last time when numbers were at most one cell apart

    ARRAY formula in C43 then copied other cells
    Please Login or Register  to view this content.
    How ARRAY formula is entered

    Paste Formula in the cell.
    Press F2
    Hold Shift+ Ctrl Keys and hit Enter key.
    Now the formula is surrounded by {} by excel.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  8. #8
    Registered User
    Join Date
    05-04-2018
    Location
    Hong Kong
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    69

    Re: Formula to trace back to last time when numbers were at most one cell apart

    AliGW, sorry I mis-understood you. Update of my profile made.

    kvsrinivasamurthy, the formula is brilliant and seems to work well. Thank you very much!

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Formula to trace back to last time when numbers were at most one cell apart

    Thanks for the update.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  10. #10
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Formula to trace back to last time when numbers were at most one cell apart

    Thanks for feed back.
    Last edited by kvsrinivasamurthy; 07-15-2019 at 05:53 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] HELP!! Need a formula to test for multiple conditions and bring back numbers with same
    By raysrains in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 06-02-2015, 07:57 AM
  2. Array Formula Lookup - Bring back Lowest Date + Bring Back Cell Location
    By Matt1998 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-04-2014, 12:08 PM
  3. [SOLVED] Protect sheet but allow trace precedents / trace dependents?
    By abchak1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-16-2013, 10:32 AM
  4. Replies: 2
    Last Post: 11-07-2011, 02:01 PM
  5. Time formula going back to zero?
    By Kmac in forum Excel General
    Replies: 16
    Last Post: 03-31-2010, 03:39 AM
  6. Trace dependent does not work, trace precedent does
    By marnie in forum Excel General
    Replies: 0
    Last Post: 05-23-2007, 12:50 PM
  7. [SOLVED] how do i trace back my sort command on a column ?????
    By rp in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-01-2005, 09:15 AM

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