+ Reply to Thread
Results 1 to 8 of 8

Drop Down and vlookup

  1. #1
    Registered User
    Join Date
    05-14-2021
    Location
    UK
    MS-Off Ver
    365
    Posts
    32

    Post Drop Down and vlookup

    Evening all,

    I have become stuck and I was hoping some experts could help me out?

    I want to create a table that will have the user select a month from a drop down. Based on this month selection I then want values to return from a data list but not to bring across any duplicates only return one value.

    I've attached a template to try to help with what I'm describing.

    Is this possible please?

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Drop Down and vlookup

    Do you mean that you want to exclude duplicates if they appear within the selected month, or if they appear in earlier months?

    Pete

  3. #3
    Registered User
    Join Date
    05-14-2021
    Location
    UK
    MS-Off Ver
    365
    Posts
    32

    Re: Drop Down and vlookup

    Hi Pete,

    Yes I want to exclude the duplicates. So in the example of user selecting Oct-21 from drop down if Project A was listed three times I only want it to return one Project A.

    Hope I'm explaining this ok 😕

    Thanks again for taking the time to reply.

    Paula

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Drop Down and vlookup

    For example, Project B appears in August, as well as September. If September is selected in C2 do you want to see Project B shown for that month, or not (because it appears in an earlier month)?

    Pete

  5. #5
    Registered User
    Join Date
    05-14-2021
    Location
    UK
    MS-Off Ver
    365
    Posts
    32

    Re: Drop Down and vlookup

    Yes, exactly this. I want Project B to appear even is the user selects September or August from the drop down list. 👍🏻

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Drop Down and vlookup

    Okay, using column L as a helper column, put this formula in L3:

    =IF(AND(J3=$C$2,COUNTIF(K$3:K3,K3)=1),MAX(L$2:L2)+1,"-")

    Copy down to the bottom of your data. Then you can use this formula in cell C5:

    =IF(ROWS($1:1)>MAX($L:$L),"",INDEX($K:$K,MATCH(ROWS($1:1),$L:$L,0)))

    and copy that down as far as you need to.

    If you do want to include projects that occur within the month selected (regardless of if they have occurred in earlier months), you can change the formula in L3 to this:

    =IF(AND(J3=$C$2,COUNTIFS(K$3:K3,K3,J$3:J3,J3)=1),MAX(L$2:L2)+1,"-")

    Hope this helps.

    Pete

  7. #7
    Registered User
    Join Date
    05-14-2021
    Location
    UK
    MS-Off Ver
    365
    Posts
    32

    Re: Drop Down and vlookup

    This is amazing Pete. Thank you so much for helping me - works an absolute treat!

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Drop Down and vlookup

    That's good to hear. I think we had a few crossed posts earlier.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    You might also like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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] VLOOKUP drop down list
    By PaulaGon in forum Excel General
    Replies: 2
    Last Post: 11-26-2020, 06:11 PM
  2. Vlookup and drop down
    By johnny4strings in forum Excel General
    Replies: 7
    Last Post: 01-16-2020, 10:45 AM
  3. Drop Down List Using Vlookup
    By Jess709 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-08-2016, 03:42 PM
  4. [SOLVED] VBA vlookup drop down list
    By rs1aj in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-21-2014, 12:52 PM
  5. Vlookup And Drop down
    By Liju144 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-27-2014, 07:29 AM
  6. Replies: 2
    Last Post: 08-09-2011, 08:41 PM
  7. VLOOKUP and Drop Down menus
    By kburton552 in forum Excel General
    Replies: 2
    Last Post: 07-23-2010, 08:47 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