+ Reply to Thread
Results 1 to 12 of 12

Index formula to return the next entry not alreday included a previous range

  1. #1
    Forum Contributor
    Join Date
    05-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Index formula to return the next entry not alreday included a previous range

    Hi All,

    I'm having issues getting my head around this issue, I have a list of vendors in Column B of Sheet1. (circa 2000 vendors)

    In Sheet2 I have a list containing the majority of those same vendors in cells A8:A1350, I need a formula (that I can use in cell A1370:Axxx) that will list the next vendor not already included in range A8:A1350.

    In a few months I'll need to recreate the formula to exclude the vendors in the ranges A8:A1350 and A1370:Axxx

    The formula below is about as far as I've managed and I can't see any examples out there.

    =IFERROR(INDEX(Sheet1!$B$1:$B$2000, -COUNTIF(?? ,"")

    Any assistance would be appreciated.

    Thanks

  2. #2
    Forum Contributor
    Join Date
    02-20-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    170

    Re: Index formula to return the next entry not alreday included a previous range

    Hi Dave,

    Can you upload a sample of your workbook?

  3. #3
    Forum Contributor
    Join Date
    05-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Index formula to return the next entry not alreday included a previous range

    Hi cffndncr, thanks for looking at this for me.



    Ven Sample.xlsx

  4. #4
    Forum Contributor
    Join Date
    02-20-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    170

    Re: Index formula to return the next entry not alreday included a previous range

    Hey Dave,

    I couldn't think of an elegant way to do this in one formula; I've added a couple of calculation columns in the first sheet, but you can hide these.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    05-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Index formula to return the next entry not alreday included a previous range

    Hi cffndncr,

    Thanks for the solution, one thing I've just noticed and it's my issue for not mentioning it, but the original list (SheetB Complete List) of vendors has duplicates in the range, and as a result the list now returns more than one entry if it happens across one of these and it hasn't seem it before.

    Any way it can eliminate duplicates?

    Thanks

  6. #6
    Forum Contributor
    Join Date
    02-20-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    170

    Re: Index formula to return the next entry not alreday included a previous range

    Hey Dave,

    I've updated it so that it (should) not return duplicates. I've doubled up Vendor23 to test it, let me know if it all looks ok!
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    05-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Index formula to return the next entry not alreday included a previous range

    Hey cffndncr,

    That solution appears to work perfectly, thanksyou for the help on this and I'll mark the thread as Solved.

    Cheers

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Index formula to return the next entry not alreday included a previous range

    You can also try this code......
    Please Login or Register  to view this content.
    For detail see the attached sheet.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  9. #9
    Forum Contributor
    Join Date
    02-20-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    170

    Re: Index formula to return the next entry not alreday included a previous range

    Sigh, you VBA wizards, always making the formula kids look bad

  10. #10
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Index formula to return the next entry not alreday included a previous range

    @ cffndncr

    This is another option for OP. If he prefers, he can use the vba code also without inserting helper columns. It is different approach to get the desired results.
    I think sometimes vba codes are more fruitful than the formulas.

  11. #11
    Forum Contributor
    Join Date
    05-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Index formula to return the next entry not alreday included a previous range

    Hi, cffndcr and sktneer,

    Thanks both for the VBA abd non VBA solutions, as the spreadsheet will be used by novice users I'll probably stil to the non VBA solution on this one.

    Regardless thanks to you both.

  12. #12
    Forum Contributor
    Join Date
    02-20-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    170

    Re: Index formula to return the next entry not alreday included a previous range

    @Sktneer: I'm just sad that I have no idea how to use VBA :P

+ 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. Replies: 1
    Last Post: 08-24-2013, 12:20 PM
  2. Return a value in a range of cells based on a previous formula
    By gori1084 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-30-2013, 11:14 PM
  3. Replies: 2
    Last Post: 01-12-2012, 07:02 AM
  4. Modify the # of cells included in a range based on formula
    By frenkile in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2011, 09:16 AM
  5. Replies: 2
    Last Post: 09-18-2008, 05:47 AM

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