+ Reply to Thread
Results 1 to 6 of 6

Return the previous/next different text

  1. #1
    Registered User
    Join Date
    10-30-2017
    Location
    Loughborough
    MS-Off Ver
    MS Office 365 Excel 2016
    Posts
    10

    Return the previous/next different text

    Hi there clever excellents!

    I apologise in advance for my ignorance and I have tried to source a solution but, fear that it lies in the INDEX/MATCH blackhole of my knowledge!

    I have attached a very basic spreadsheet and have manually completed it but, the spreadsheets that I am working on are much bigger and it is simply not feasible to manually complete them.

    I am trying to understand the formula I need to be able to return the previous or next name in a string of names based upon an index number that changes. In the spreadsheet, I have two Indices (2428 and 2429 ) and as these change the names will change and therefore the formula needs to restart. The Current name (Column B) is fixed and I want to be able to see who was before this and who was after this ... obviously at the start/end of an index string there will be no one previous/next and this needs to blank or NA.

    I hope I have been clear ... and once again apologise for my ignorance.

    Many thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Return the previous/next different text

    a few options, one being:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    the second isn't ideal, from best-practice perspective, but it should do what you need, I think

  3. #3
    Registered User
    Join Date
    10-30-2017
    Location
    Loughborough
    MS-Off Ver
    MS Office 365 Excel 2016
    Posts
    10

    Re: Return the previous/next different text

    Thank you, the first one is definitely a good one. The second does not seem to work throughout the column for some reason ... it works with the first set but not the second.

    I can definitely work with the "previous" ... thank you!

  4. #4
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Return the previous/next different text

    ok - you may need to post an example to illustrate the failure as, using your sample, the formula should generate your expected results.

  5. #5
    Registered User
    Join Date
    10-30-2017
    Location
    Loughborough
    MS-Off Ver
    MS Office 365 Excel 2016
    Posts
    10

    Re: Return the previous/next different text

    Forgive me, I got confused by the side by side names being the same and forgetting that I had Bob before and after (doh) ... it works perfectly; you are a legend. Thanks

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Return the previous/next different text

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

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Incrementing numbers based on previous values and text values of a previous cell
    By mauricewsylvester in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-08-2021, 12:34 PM
  2. [SOLVED] Return Previous Date?
    By applecore821 in forum Excel General
    Replies: 2
    Last Post: 02-16-2020, 05:59 PM
  3. [SOLVED] How to return yesterdays date unless today is monday then return previous fridays date
    By ciaron178 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-10-2019, 10:15 AM
  4. return specific names associated with previous cell's text
    By Marcusatki in forum Excel General
    Replies: 6
    Last Post: 02-14-2017, 09:32 AM
  5. return to previous worksheet
    By peter wischhusen in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 3
    Last Post: 03-01-2015, 03:30 PM
  6. Compare text in a cell with the text in the previous cell and return a value
    By kinley in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-09-2010, 04:14 AM
  7. Return previous value formula
    By gabster77 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-13-2010, 03:42 PM

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