+ Reply to Thread
Results 1 to 11 of 11

Dynamic Vlookup based on selections

  1. #1
    Forum Contributor
    Join Date
    08-22-2013
    Location
    columbus,oh
    MS-Off Ver
    Office 365
    Posts
    190

    Dynamic Vlookup based on selections

    sample.xlsmI am trying to create a sheet with dynamic lookup based on selections.
    So if a user selects planning or costing and then the state then click on search then it cell B13 it should lookup from data sheet and give full state name and in cell C13 give the document name and in D13 give the print rule.
    If in the data sheet the document type says planning/costing and there is no corresponding state to that document then it should be incliuded in all searches.
    When I click clear then it resets the search.

    So if i slect Planning and state as AL then the display should be
    Alabama ABC DEF
    A12 AA1 (aligned to previous row)
    C12 AA3 (aligned to previous row)
    E12 AA5 (aligned to previous row)

    Also is it a better option to do planning and costing as a radio button or drop down list.
    Is there a way in the state selections to show the drop down list arrow at all times.
    Currently when the cell is not selcted it disappears.

    Any help is appreciated!

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Dynamic Vlookup based on selections

    Hi.

    In my opinion, it is better to do the Planning/Costing option as a drop-down list. Using a drop-down list can actually mean you don't need to use VBA to execute the search, but rather Array Formulas.

    I have uploaded a workbook with an example of this (called "AJRYAN88").

    I hope this helps

    P.S. If you would prefer it to be implemented as per your original setup instead, let me know and I will help you out, but I always prefer non-VBA solutions as they are better for the majority of users
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    08-22-2013
    Location
    columbus,oh
    MS-Off Ver
    Office 365
    Posts
    190

    Re: Dynamic Vlookup based on selections

    Hi ajryan88,
    Thank you so much for taking the time to help me out !
    I looked at your file and this I think could work but the problem is that there are multiple people going to be touching this file and the chances that the formula breaks is quite high..so even though this works if it is as a code in the sheet It won't break due to user intervention.
    I really like the drop down list as Planning/costing as opposed to the radio button.This looks a lot cleaner.
    Do you think you can help the VBA way?
    I appreciate it.
    Thanks!

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Dynamic Vlookup based on selections

    Sure thing

    The VBA implementation is on the "AJRYAN88 VBA" worksheet.

    Let me know
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    08-22-2013
    Location
    columbus,oh
    MS-Off Ver
    Office 365
    Posts
    190

    Re: Dynamic Vlookup based on selections

    This works great, I just need one slight modification.
    There should be a "Reset" button so that if the user wants to reset the search they can do so.
    Thank you!!

  6. #6
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Dynamic Vlookup based on selections

    I can implement that if you still want it, however I coded it such that clearing one of the "STATE" or "TYPE" cells will reset the list.

    Let me know if you still want a Reset button...

  7. #7
    Forum Contributor
    Join Date
    08-22-2013
    Location
    columbus,oh
    MS-Off Ver
    Office 365
    Posts
    190

    Re: Dynamic Vlookup based on selections

    sampleMODIFIED.xlsm
    Hi AJ,
    I like your idea of this resetting and not having a clear ,button.
    However I do have 1 more request.
    I would like to add one more dependency called package type.
    It will be a list and should be the 1st condition to type of document.
    I modified the data and the list .
    Also There is a condition in the code where you have that is the cell is empty add to all searches.
    Can we change that to if it says "Multi" display with all.
    so essentially my search of :Operations>PLanning>Ca should come up with

    OPERATIONS PLANNING CALIFORNIA MNO PQR
    OPERATIONS PLANNING Multi A12 AA1
    OPERATIONS PLANNING Multi C12 AA3
    OPERATIONS PLANNING Multi E12 AA5

    WOuld this be too much too change?
    Again I really appreciate all your help.
    Thanks!
    Last edited by pdalal; 07-04-2014 at 07:32 PM.

  8. #8
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Dynamic Vlookup based on selections

    Yeah no worries. If I am guessing correctly, you are saying that the empty states on the DATA worksheet now say "Multi" instead of saying nothing at all? If so, just replace
    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.
    I hope this helps

  9. #9
    Forum Contributor
    Join Date
    08-22-2013
    Location
    columbus,oh
    MS-Off Ver
    Office 365
    Posts
    190

    Re: Dynamic Vlookup based on selections

    You were quick I was just thinking about this and changed my previous post!

  10. #10
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Dynamic Vlookup based on selections

    Not a problem. Try this
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    08-22-2013
    Location
    columbus,oh
    MS-Off Ver
    Office 365
    Posts
    190

    Re: Dynamic Vlookup based on selections

    This is perfect !!
    Thank you so much !!

+ 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. Dynamic autofilter based on user selections on userform with chkboxes...
    By Sravanmonty in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-21-2014, 06:39 AM
  2. Replies: 0
    Last Post: 03-18-2013, 08:43 PM
  3. Replies: 3
    Last Post: 02-28-2012, 02:15 PM
  4. Building a dynamic task list based on checkbox selections
    By sstar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-15-2011, 07:23 PM
  5. [SOLVED] Dynamic charting based on two drop down selections - help
    By TalResha in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 01-07-2011, 06:52 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