+ Reply to Thread
Results 1 to 8 of 8

Dependent Data Validation List from Different worksheets

  1. #1
    Registered User
    Join Date
    04-26-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    14

    Dependent Data Validation List from Different worksheets

    Hi!

    I am building a document which has several dependent variables. The document is so structured that values are pulled in different cells based on other cell values. While I have been successful in implementing most of the requirements, there is one place I am stuck at.

    I need to form dependent data validation lists which pulls data from a different worksheet for each value in the preceding list. I have enclosed a simplified form of the sheet. Here I would like to mention that I cannot change the structure of the workbook / worksheet and it has to stay as is. Also, I am not averse to using VBA but would prefer if the result can be obtained using a combination of formulas.

    The enclosed workbook is divided into the following parts:

    1. A main DATA sheet which provides input on 2 lists on other sheets - Continents and Currencies - as well as the exchange information
    2, A different sheet for each continent which lists information on the countries in each.
    3. A Calculation sheet which has 3 data validation lists - for continents, countries and currencies.

    Now, if all the data would have been in one sheet, it was ok. But since there are 5 different sheets for the same data, the data validation in the 'Calculation' sheet has to be such that:

    a. On selecting the continent, the data list under 'Country' should pull data from relevant sheet.
    b. The formula used under 'Population' should get updated to get the data from the relevant sheet
    c. The formula under 'Per Capita GDP' should be updated to get data from relevant sheet depending on the currency selected.

    Note: The data in all the sheets will be similarly structured.

    Hope I have been able to explain the problem and the solution required.

    Any help will be appreciated!!
    Attached Files Attached Files
    Last edited by vpipalia; 06-20-2017 at 05:30 AM.

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Dependent Data Validation List from Different worksheets

    In Data sheet put Continents F2:J2 and change sheet name Europé to Europe

    Then

    F3
    Formula: [Select Code] copy to clipboard

    =IF(ROWS(F$3:F3)-1 < COUNTA(INDIRECT("'"&F$2&"'!A:A"))-1,INDEX(INDIRECT("'"&F$2&"'!A:A"),ROWS(F$3:F3)+2),"")



    drag towards the cell and down!!

    Now select F2:J13 and press Control+Shift+F3 uncheck left column and then ok.

    In calculation sheet

    B2 create drop down press Alt->V->V and put at source =INDIRECT($A2) and ok drag down.

    Check the attached file hope this will help.
    Attached Files Attached Files
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Dependent Data Validation List from Different worksheets

    Alternative:

    Create named ranges and drop down as per Shukla's post then:

    in C2

    =INDEX(INDIRECT("'"&$A2&"'!$A$3:$I$11"),MATCH($B2,INDIRECT("'"&$A2&"'!$A$3:$A$11"),0),MATCH(C$1,INDIRECT("'"&$A2&"'!$A$1:$I$1"),0))

    Ensure headings in "Calculation" are consistent with workbooks e.g. "Population" vs "Population Index"

  4. #4
    Registered User
    Join Date
    04-26-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    14

    Re: Dependent Data Validation List from Different worksheets

    Quote Originally Posted by shukla.ankur281190 View Post
    In Data sheet put Continents F2:J2
    Thanks for the reply and apologies for the delay in reverting. But this doesnt work as I cant change the structure of the worksheets. Do bear in mind that this is a simplified version of the file with fictitious data. The original I cant share. But I'll try and explain the situation further.

    Say,

    You have a restaurant chain with outlets in 10 different countries each managed locally by people you have hired. There are 25 different items groups bought in each of these countries for the respective restaurant located there. Each group has in excess of 15 items each. However, not all item may be available in all the countries and items in the same group may vary from country to country. Now as the owner of the chain you have monitor these purchases. So you create an excel file in which on selecting the item & country of purchase, the price for that item will be pulled from the sheet named after the country selected.

    Now since each of the countries will have a different currency, you also have to select the currency in which you want to view the prices. Based on your selection, the price will need to be converted to the respective currency based on the price of purchase in the country selected.

    I am enclosing an updated sample sheet with the above description to better reflect the required solution. Hope this clarifies any other details.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Dependent Data Validation List from Different worksheets

    Your 2 sample files are completely different: is the latest file EXACTLY the structure of your "real" file. If NOT, please post a file which is true representation so that people do not waste their time on solutions which are not relevant to the real problem.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Dependent Data Validation List from Different worksheets

    To get price:

    in D2


    =IFERROR(INDEX(INDIRECT("'" &$B2 &"'!$C$2:$I$33"),MATCH($A2,INDIRECT("'" &$B2 &"'!$B$2:B$33"),0),MATCH("Equivalent Price in " & $C2,INDIRECT("'" &$B2 &"'!$C$1:I$1"),0)),"")

    Copy down
    Attached Files Attached Files
    Last edited by JohnTopley; 06-12-2017 at 12:29 PM.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Dependent Data Validation List from Different worksheets

    Create named ranges

    e.g. Named Range: China ==> Refers to: =China!$B$1:$I$51

    in D2


    =IFERROR(INDEX(INDIRECT(B2),MATCH($A2,INDEX(INDIRECT(B2),,1),0),MATCH("Equivalent Price in " & $C2,INDEX(INDIRECT(B2),1,0),0)),"")
    Attached Files Attached Files
    Last edited by JohnTopley; 06-12-2017 at 02:12 PM.

  8. #8
    Registered User
    Join Date
    04-26-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    14

    Re: Dependent Data Validation List from Different worksheets

    Hello All!

    Thank you very much for the help! Apologies again for the late reply.. I was busy putting your inputs in place and it worked!

    The data validation allows us to use the indirect function which can be referenced to a cell value. So I didn't need named ranges and still got the desired result. Thank you all once again!!

+ 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 dependent on another list
    By pauldaddyadams in forum Excel General
    Replies: 2
    Last Post: 07-06-2016, 11:32 AM
  2. Replies: 0
    Last Post: 04-24-2015, 02:27 PM
  3. Data validation - dependent list
    By hitarov in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-02-2013, 08:50 AM
  4. Data Validation List - Dependent on Adjacent Cell - Value from Unsorted List
    By justforthis1 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-26-2013, 12:24 PM
  5. Replies: 2
    Last Post: 07-17-2012, 01:18 PM
  6. Dependent Data Validation Lists From other Worksheets
    By NaturalBlogarithm in forum Excel General
    Replies: 3
    Last Post: 07-16-2011, 02:34 PM
  7. Dependent List- Data Validation
    By Annie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-23-2005, 11:05 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