+ Reply to Thread
Results 1 to 9 of 9

Multidiemntional vlookup and autofill cell

  1. #1
    Registered User
    Join Date
    12-12-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    24

    Multidiemntional vlookup and autofill cell

    Bonjour, I have a difficult one here (for me at least).

    I am trying to fill a series of cell that are dropdownlist themselves and there adjacent cells based on the selection made in an other dropdownlist.

    Scenario :
    The spreadsheet is used to build spaceship (yeah, I know, but it's an example )

    To build a space ship, you need to choose, from a list of components and the number of each components. Not every spaceship needs the same components and not de same number of the chosen components.

    Components :
    Cockpit
    Wing
    Cargo
    Passenger suit
    Engine
    Radar
    Weapon

    I have a list of 15 dropdownlist cells where you can choose the component you want to build the ship and the number of component. You can freely create your ship OR use a pre made ship from a dropdownlist.

    The choice you make for your pre-build ship will define what is going to appear in the dropdownlist below along with their numbers.

    I know how to work with VLOOKUP and different array, I don't know, though, how to work with a cell that will be a vlookup OR a dropdownlist and I don't know how to work with multiple table since not all table have the same number of items no how many items.

    I hope this weird example is clear enough and that you will be able to point me in the right direction.

    Thanks,
    Regards,

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

    Re: Multidiemntional vlookup and autofill cell

    Hi Warluck,

    This problem sounds like you want Cascading Validation. Read:

    http://www.excel-user.com/2011/02/ca...ion-lists.html
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    12-12-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Multidiemntional vlookup and autofill cell

    Thanks MarvinP,
    I don't get how this could be of any help, not sure I do understand well the "choose" function.

    Basic question, can a cell be a dropdownlist OR calculated value at the same time?

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

    Re: Multidiemntional vlookup and autofill cell

    Hi Warluck,

    You really need to attach a sample workbook so we can see what you are trying to do. Put what you have and what you expect to get by doing stuff. Working on a simple problem that we all can see the data is normally the best approach to a solution.

  5. #5
    Registered User
    Join Date
    12-12-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Multidiemntional vlookup and autofill cell

    In the spreadsheet (SpaceShip.xlsx) you will find, at the top, all the named list I have created.

    In cell B10, you can choose a spaceship or not.

    In cells B13..B25 there is a dropdown list where you can choose different components and enter their quantity.

    If I decide to chose a pre-build ship, in cell B10, I want cells B13 to C25 to automatically fills with value for each type of spaceship (see named list).

    This can be VB or pure excel, I don't care, as long as I manage what I want to do.

    Again, thanks for you help and, most of all, invaluable expertise.
    Attached Files Attached Files

  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,926

    Re: Multidiemntional vlookup and autofill cell

    Basic question, can a cell be a dropdownlist OR calculated value at the same time?
    No, it cant. If you have a formula in a cell that contains a DD, the 1st time you use the DD, the formula will be over-written
    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
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Multidiemntional vlookup and autofill cell

    Hi Warluck,

    When you use the dropdown you overwrite the formula that gives the lookup. See the attached to see if it is half an answer.

    VBA can do this kind of stuff but look first at the formulas I've supplied. Maybe I'll write you some VBA next.
    Attached Files Attached Files

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

    Re: Multidiemntional vlookup and autofill cell

    Hi,

    Here is your answer that uses VBA to get what I think you want.
    You change the word in B10 and it will fill in your table.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-12-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Multidiemntional vlookup and autofill cell

    Bonjour MarvinP,
    I thank you very much for your time and expertise, Excel is a beast to master but it is darn powerfull....

    Your VBA script is exactly what I was looking for.

    Tanks You!

+ 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. Autofill base on Active Cell and Autofill by row count of another sheet
    By enyak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-19-2014, 10:06 PM
  2. Autofill vlookup
    By chriscaleffi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-17-2013, 12:58 PM
  3. Autofill Vlookup Macro to Last Row of Data
    By SR20 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-05-2013, 02:36 PM
  4. [SOLVED] Autofill using vlookup (or index+match)
    By Petijandro in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-29-2013, 09:32 AM
  5. Autofill VLOOKUP function
    By gutter_mutt in forum Excel General
    Replies: 8
    Last Post: 10-01-2010, 07:05 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