+ Reply to Thread
Results 1 to 3 of 3

Variable Data Validation for LIST

  1. #1
    Registered User
    Join Date
    01-30-2017
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    2013
    Posts
    1

    Question Variable Data Validation for LIST

    I have created a list through Data Validation for a Drop Down menu based on the below table with the following formula:
    =OFFSET(TEST!$A:$A,0,0,COUNTA(TEST!$A:$A),1)

    On another sheet in a cell (example A2) the user can select from a dropdown containing: AF, AG, AW, BA, BC, BV, CG, CK (based on the above formula)

    A cell below (example A3) I wish to present them with another dropdown that gets populated based on their earlier choice:
    EXAMPLE 1:
    In cell A2 they choose: BC
    In cell A3 the dropdown should contain: Bob, William
    I am expecting that the formula that would work will have somewhat that following format:
    =Offset(TEST$!$5:$5,0,1,1,counta(TEST!$5:$5)-1)

    In cell A2 they choose: AG
    In cell A3 the dropdown should contain: George, Peter, Stuart
    I am expecting that the formula that would work will have somewhat that following format:
    =Offset(TEST$!$2:$2,0,1,1,counta(TEST!$2:$2)-1)

    In cell A2 they choose: BA
    In cell A3 the dropdown should contain: Carl, Chris, Fred, Jeff, Richard
    I am expecting that the formula that would work will have somewhat that following format:
    =Offset(TEST$!$4:$4,0,1,1,counta(TEST!$4:$4)-1)


    I know that the above formulas work, but how do I make them work with the value in A2?

    The following formula can find the ROW
    =MATCH($A$2,TEST!$A:$A,0)

    How do I work this in the Below formula?
    =Offset(TEST!$2:$2,0,1,1,counta(TEST!$2:$2)-1)

    I have tried replacing (in the above example) the 2 for MATCH(TEST!$A$2,TEST!$A:$A,0) but no luck.

    Can someone help?

    A B C D E F
    1 AF John
    2 AG George Peter Stuart
    3 AW Pierre Oscar
    4 BA Carl Chris Fred Jeff Richard
    5 BC Bob William
    6 BV Hans
    7 CG Jack
    8 CK Alan Joe

    SHEET: TEST
    Last edited by gharwood; 01-30-2017 at 12:36 AM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Variable Data Validation for LIST

    Hi GHarwood and welcome to the forum,

    See the example where I've changed your data a little so I could do Advanced Filters on it. Then*using some VBA code to rebuild the name list it will do what you want. Look at the VBA code behind the sheet and in the module.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    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
    81,243

    Re: Variable Data Validation for LIST

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    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.

+ 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] Data Validation: How to clear/delete the content of the cell and not Data Validation List?
    By lukelucky in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-07-2015, 09:42 AM
  2. [SOLVED] Data Validation List to Return Variable/Dynamic Data based on Reference Table
    By dilbert1865 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-13-2014, 09:08 AM
  3. VBA for variable lookup from data validation list
    By Ravenous in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-15-2013, 01:03 AM
  4. Replies: 1
    Last Post: 09-13-2012, 03:46 PM
  5. Replies: 3
    Last Post: 04-11-2011, 05:52 PM
  6. Validation List Using Variable
    By jamgood96 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2011, 02:33 PM
  7. Creating a variable validation list
    By Kurt Sasse in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-11-2006, 02:45 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