• Populate a cell with color based on a dropdown lis

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Populate a cell with color based on a dropdown lis

    Author
    Topic
    #426843

    Is there a way to apply to a cell a particular color that is selected from a drop-down list (sort of like the validation list type of drop-down), which still allows the user to enter text in that cell as well? So basically when the user clicks in that cell, he can type whatever he wants, but he also gets a drop-down list where he can pick his colour from to ‘pain’t his cell… I have a feeling that this is not realy feasable, at least I couldn’t come up with a solution on my own…

    Thanks,
    Kislany

    Viewing 2 reply threads
    Author
    Replies
    • #987447

      Let me ask a naive question: doesn’t the Fill color dropdown on the Formatting toolbar do what you want? You select a cell (or cells), then select a fill color from the dropdown on the toolbar.

    • #987451

      If the “paint can” as Hans suggested is not what you want, John Walkenbach has a demo of A Color Picker Dialog Box that you could be adapted…

      Steve

      • #987453

        Thanks a lot for your tips, I will have to look into them, and see if my manager is happy with any of them – I have a feeling that the regular color picker is not what he wants, as he wants to select from a limited number of colors when he clicks on the drop-down, but let’s see…

        Thanks again,
        Kislany

        • #987470

          If only a limited set is needed, you could also just use a combobox to select the color name and based on the name chosen set it accordingly. Programming would be simpler than the Walkenbach method.

          Steve

    • #987481

      If you can’t get what you want with Hans’ and Steve’s suggestions don’t get you what you want, you could also use the worksheet BeforeDoubleClick event routine to display a userform that allows the user to pick the colors from a list that you control.

    Viewing 2 reply threads
    Reply To: Populate a cell with color based on a dropdown lis

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: