+ Reply to Thread
Results 1 to 9 of 9

Custom validation list with conditions

  1. #1
    Registered User
    Join Date
    10-17-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    Custom validation list with conditions

    Hello Excel Experts!

    I am trying to create a validation list, with its source data being filtered from another sheet of the same workbook. I also need to validate the drop list against some conditions in the source table.

    Here is an example of the data am trying to create`(I want to create the droplist for the column Contract):

    "Contract Definition" Sheet or Table:
    -----------------------------------
    Company Contract Service Report End date: Status
    --------- --------- -------------- --------- ------
    CompanyA ContractA1 Service 1 31/12/2014 Active
    CompanyA ContractA2 Service 2 31/12/2014 Active
    CompanyB ContractB1 Service 1 31/12/2014 Inactive


    "Service Reports" Sheet or Table:
    --------------------------------
    Company Contract Service Report
    --------- --------- ----------------
    CompanyA ContractA1 Service 1
    CompanyA ContractA1 Service 2
    CompanyA ContractA2 Service 3



    In the Service Reports Sheet, i want to create a list for each Contract, based on the specified Company and on the Status field, as defined in the Contract definition table.

    Thanks!

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Custom validation list with conditions

    Hello Meph Welcome to the forum can you please post a workbook
    To attach a workbook go to advanced, add file, select file and upload and done
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Registered User
    Join Date
    10-17-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Custom validation list with conditions

    Hi hemesh,

    Here is the file I am working on:

    Workbook1.xlsx

    In sheet "Service Reports", I want that the contract field displays only the contracts related to the related company and which are still active and whose expiry date is not attained yet.

    Appreciate your help !!

  4. #4
    Forum Contributor BeachRock's Avatar
    Join Date
    11-01-2011
    Location
    Oregon, United States
    MS-Off Ver
    Excel 2016
    Posts
    403

    Re: Custom validation list with conditions

    Hi meph,

    Take a look at the file I posted here; Example-Filters.xlsm. It has a good example of dependant menus in it using data validation.
    -------------
    Tony

  5. #5
    Registered User
    Join Date
    10-17-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Custom validation list with conditions

    Hi Tony,

    Many thanks for your assistance, the Excel file you posted was of BIIIG help!

    I am almost done with my Excel: I am now (proudly) able to restrict the Contracts list to the selected company. I still need to add a couple of more restrictions to the logic regarding the contracts status and expiry date. I should be done with that by tomorrow and will update the tread accordingly.

    I never thought I would be asked to use these 'complex' Excel formulas!! (complexity being a subjective point of view )

    Cheers!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Custom validation list with conditions

    Hi and welcome to the forum

    I am almost done with my Excel:
    good luck with thinking you are "almost done". Excel becomes very addictive, and once you have mastered 1 thing, and hear/find out about another - the learning process starts all over again The more you know, the more you realize you dont know
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Valued Forum Contributor
    Join Date
    02-05-2013
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2013
    Posts
    571

    Re: Custom validation list with conditions

    .... and once you have mastered 1 thing, and hear/find out about another - the learning process starts all over again The more you know, the more you realize you dont know
    Good quote for me, this not only for excel
    Click (*) if you received helpful response.

    Regards,
    David

  8. #8
    Registered User
    Join Date
    10-17-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Custom validation list with conditions

    I was quite thrilled when I managed to make the Custom validation list work as per BeachRock's suggestion. That was a big leap for my work

    However, I am getting frustrated again by 2 obstacles:

    1- The 'master' data (in my case, it is the Contracts table) is not a static list and will not always be alphabetically sorted. In other terms, Contracts might be created for any Company and appended to the end of the master data list at any time. If the list is not sorted properly, the Contracts combo box might show contracts not related to specified company. From what i understood from the function and from what i read in the forum, that seems to be a restriction caused by the combination of the functions used. Is that correct or can this be corrected somehow?

    To make my case clearer, my data is designed like so:
    • A Company can have multiple Contracts.
    • Each contract can have several Service Reports.
    • To create a Service Report, the user has to choose a Company from the 'master' combo box and a Contract from the contracts combo box


    2- My second question is: How do I add a constraint to my validation? i want to filter contracts that are only Valid ? A column indicates the status of each contract (Valid or Expired).

    (BeachRock, i tried to reverse engineer your file, but i faced the fact am not that skilled :D )

    Here is the file I am working on :
    Attached Files Attached Files

  9. #9
    Forum Contributor BeachRock's Avatar
    Join Date
    11-01-2011
    Location
    Oregon, United States
    MS-Off Ver
    Excel 2016
    Posts
    403

    Re: Custom validation list with conditions

    Hi meph,

    I also need to figure out a way to automate the process of adding new categories for choosing and adding new sub categories to existing categories in such a way that makes it easy to do on the fly. The example workbook I posted for you was just the beginning of a project I'm working on for my job. Unfortunately, I don't have time until later next week to work on that part due to my necessity to turn in an IT budget for 30 buildings due by Wednesday. I have an idea in mind but I think it's going to take a while to figure out. I'd be happy to share what I figure out with you though.

    Are you on a time constraint?

    However, I wanted to pass on to you that if auto filters won't constrain your data as you need in your 2nd item above, the workbook I posted for you also has a great multiple category filter method contained in it. You can use it to bypass the limitation of autofilter having only two categories. Click this link to watch the YouTube video where I learned it and then maybe reverse engineering my workbook for the filters will make more sense.

    I added a more recent version of my project too. Much farther along. Take a look at my Lists sheet. This is where my data is pulled from. Same idea as yours but I'm not creating a page for each category. The color coding helps tremendously. I think it might be easier to add the ability for categories and sub-categories to be manipulated with them this way.
    Attached Files Attached Files
    Last edited by BeachRock; 10-20-2013 at 12:57 AM. Reason: Added attachment

+ 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] Custom List Validation
    By Bigbeam in forum Excel General
    Replies: 4
    Last Post: 01-21-2013, 02:02 PM
  2. How to incorporate validation list in custom validation?
    By ohlalayeah in forum Excel General
    Replies: 11
    Last Post: 08-07-2012, 06:01 AM
  3. [SOLVED] List:Custom Data Validation
    By dread in forum Excel General
    Replies: 2
    Last Post: 07-20-2006, 04:35 PM
  4. custom dependent list validation
    By ben h in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-24-2005, 01:05 AM
  5. [SOLVED] Data Validation w/custom + w/list
    By Keith in forum Excel General
    Replies: 4
    Last Post: 05-02-2005, 12:06 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