+ Reply to Thread
Results 1 to 16 of 16

Drop menus

  1. #1
    Registered User
    Join Date
    01-20-2010
    Location
    dk
    MS-Off Ver
    Mac Excel 2008
    Posts
    19

    Drop menus

    Hey,

    I'm looking to make an excel spreadsheet with some features I'm not sure how to do.

    Referring to the attached picture:

    If we look at row 3 column 4 (Kode).

    What i would like is to make a drop down menu with different values. (1-1000)

    When i select one of the values, lets say 1;

    columns 1, 3, and 5 will auto fill with data i have predetermined to be associated with the value 1.

    I hope you understand what i mean.
    Attached Images Attached Images

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Drop menus and more

    Check here for dependent list data validation:

    http://www.contextures.com/xlDataVal02.html

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Drop menus and more

    Hi sludeking,

    welcome to the forum.

    for your dropdown list in the Kode column, you can use a simple data validation with a list that you specify on a different sheet. See here how data validation with a list can be set up http://www.contextures.com/xlDataVal01.html.

    Then, next to that list that you use for data validation, you store the values that you want to return with a lookup. Give the lookup table a range name, for example DataTable. Then in your column next to Kode, you can then use a formula like

    =vlookup(D3,DataTable,2,False)

    To fine tune the formula and show you in more detail how this could work, please upload a file with some sample data. You can upload a file by clicking "Go Advanced" below the Quick Reply box and then the paper clip icon.

    cheers

  4. #4
    Registered User
    Join Date
    01-20-2010
    Location
    dk
    MS-Off Ver
    Mac Excel 2008
    Posts
    19

    Re: Drop menus and more

    Hey Teylyn,

    I was just looking at the link you posted and I attempted it. However, I did run into a problem.

    I have 2 sheets.

    On sheet 2 I have the list - cells A1:A12 with the months of the year and the list being called "List".

    On sheet 1 I wanted the drop down menu in cell A1. So as instructed I selected A1 and then Data>Validation with the following settings

    Allow => list

    Source => =List (I named the list after the = sign as told to do so when the list is on another spreadsheet)

    Problem is now, it doesn't work. Have I missed something??

  5. #5
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Drop menus and more

    What is not working? Can you upload a sample file?

  6. #6
    Registered User
    Join Date
    01-20-2010
    Location
    dk
    MS-Off Ver
    Mac Excel 2008
    Posts
    19

    Re: Drop menus and more

    Teylyn,

    I tried on ms excel 2007 (windows) just now. It worked fine when the list was on another sheet.

    Why it didn't work on my mac excel 2008, I'm clueless. But now I have that done, I'm gonna build as much of it now that I can and will return when I'm lost once more.

    Thanks for the help so far, and I will probably be here sooner than later

  7. #7
    Registered User
    Join Date
    01-20-2010
    Location
    dk
    MS-Off Ver
    Mac Excel 2008
    Posts
    19

    Question Re: Drop menus and more

    Hey,

    Now that I've worked out all the main information needed for the excel spreadsheets comes the tough part, for me at least.

    Referring to the attachment.

    Cell A5: Code '1' is chosen

    Cell B5, C5, and D5 have the following information respectively: 4007, Memberships, 17,5

    What I need help with is. When Code '1' is chosen, Cells B5, C5, and D5 automatically enter the information associated with Code '1'.
    Attached Files Attached Files

  8. #8
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Drop menus and more

    Hi, you can use Vlookup for that. First you need to create a table where excel can find the values you want to fill in automatically. You can do that on your Lists sheet.

    Please Login or Register  to view this content.
    Select the whole table and then assign it a range name, for example LookupTable. Then in your data entry sheet, use this formula in B5, copy down and across

    =VLOOKUP($A5,LookupTable,COLUMN(),FALSE)

    The Column() nested in the VLookup will return the number of the current column, i.e. B=2, C=3 etc. If you position your lookup table in the same columns as the data entry table (just on a different sheet), this is probably the easiest way to define which column of the lookup table to return.

    hth

  9. #9
    Registered User
    Join Date
    01-20-2010
    Location
    dk
    MS-Off Ver
    Mac Excel 2008
    Posts
    19

    Re: Drop menus

    Okie. That helped and sense teylyn. Thanks.

    When I enter the Vlookup formula and drag it down to autofill the other cells in the spreadsheet:

    =VLOOKUP(A26;LookupTable!A2:D22;2;FALSE)

    LookupTable!A2:D22 increases each time. A2:D22->A3:D23->A4:D24 etc. Can I prevent it from doing so??
    Last edited by sludeking; 02-01-2010 at 06:51 AM.

  10. #10
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Drop menus

    In the formatting dialog on the protection tab, you can set individual cells to "Locked". This is the default, so you need to "unlock" cells that you want people to edit.

    Then you need to protect the worksheet. You can do that with or without a password. I'm not too sure about the Excel 2008 (Mac) interface, but if it is anywhere similar to 2007 (PC) then it's on the Review ribbon - Protect sheet, or on the Home ribbon - Format - Protect sheet.

    There are several fine tuning options that you can set, i.e. if you want to allow the user to even select protected cells or not (if they can select protected cells, they can see the underlying formula in the formula bar, but they cannot change the formula. If they can not select the cells, they have no way of figuring out the formula unless they unprotect the sheet).

    If you choose to set a password for the worksheet, be aware that sheet level password security is not fail safe and can easily be circumvented. It's more to protect the sheet from accidental changes rather than a real security tool.

    hth

  11. #11
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Drop menus

    Sludeking, you changed post #9 after I replied to it. Please do not change posts that have been replied to. It really upsets the flow of the conversation. You may be surprised at how quickly people answer on here sometimes, so just use the refresh button of your browser before you edit a post to make sure there have not been any replies.

    The response in my previous post was with regards to your original content of post #9, which was
    Another question. Now that the various cells have the Vlookup formulas in them, can they be locked so they are unable to be edited, deleted, formatted, etc?
    To answer what's currently in your post #9:

    change =VLOOKUP(A26;LookupTable!A2:D22;2;FALSE) to

    =VLOOKUP(A26;LookupTable!$A$2:$D$22;2;FALSE)

    The dollar signs make the cell references absolute, that means they will not be adjusted when copied down or across.
    Last edited by teylyn; 02-01-2010 at 07:01 AM.

  12. #12
    Registered User
    Join Date
    01-20-2010
    Location
    dk
    MS-Off Ver
    Mac Excel 2008
    Posts
    19

    Re: Drop menus

    Yeah, sorry bout that. Thought I was quick enough. Appologies.

  13. #13
    Registered User
    Join Date
    01-20-2010
    Location
    dk
    MS-Off Ver
    Mac Excel 2008
    Posts
    19

    Re: Drop menus

    Is it possible to split a single cell into 2 dropdown menus?

    For ex: the cell is spilt into 2, so the

    1st half, the choices are "months"
    2nd half, the choices are "year"

  14. #14
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Drop menus

    Nope. AFAIK, a drop-down (aka data validation list) is one list. You choose one of the options presented. Nothing else.

    But you can have two columns next to each other, where the first column is used to pick a year, the next column is used to pick a month, and you can then evaluate/concatenate the choices in yet another column.

    Care to post a sample of what you'd like to achieve?

  15. #15
    Registered User
    Join Date
    01-20-2010
    Location
    dk
    MS-Off Ver
    Mac Excel 2008
    Posts
    19

    Re: Drop menus

    Ok. Not possible. Then don't worry about it. I'll do as you say, place two columns next to each other with the values i define.

  16. #16
    Registered User
    Join Date
    01-20-2010
    Location
    dk
    MS-Off Ver
    Mac Excel 2008
    Posts
    19

    Re: Drop menus

    Hey. This is solved, but I don't have the option of Edit on the original post?

    What to do?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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