Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
data validation - select multiple options?
Is it possible to create a similar function like data validation, from which
I can select multiple options? (Background: I need a list of many names, from which I case by case can select). |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
data validation - select multiple options?
Not really.
Maybe you could use a listbox. I added a listbox from the Forms toolbar to a worksheet. I called it "List Box 1". I rightclicked on that listbox and chose Format Control. On the Control tab, I chose Selection Type of Multi. I also pointed at the range that held the values that go in that listbox. Then I added a button from the Forms toolbar (I click the button when I'm done with my selections). Then I assigned this code to the button: Option Explicit Sub testme() Dim myLB As ListBox Dim iCtr As Long Dim myCell As Range Dim myRng As Range With ActiveSheet Set myLB = .ListBoxes("list box 1") Set myCell = .Range("B1") End With With myLB ActiveSheet.Range("B1").Resize(.ListCount, 1).ClearContents For iCtr = 1 To .ListCount If .Selected(iCtr) Then myCell.Value = .List(iCtr) Set myCell = myCell.Offset(1, 0) '.Selected(iCtr) = False End If Next iCtr End With End Sub I commented the ".Selected(ictr) = false". Uncomment that line if you want the selections cleared after the range is updated. And I put the selected items in B1:B??? If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm A. wrote: Is it possible to create a similar function like data validation, from which I can select multiple options? (Background: I need a list of many names, from which I case by case can select). -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
data validation - select multiple options?
Not exactly what you asked, but see if this might be able to help you.
As you pick from the list, the choices are eliminated from the display, preventing duplicate selections. http://www.contextures.com/xlDataVal03.html -- HTH, RD ================================================== === Please keep all correspondence within the Group, so all may benefit! ================================================== === "A." wrote in message ... Is it possible to create a similar function like data validation, from which I can select multiple options? (Background: I need a list of many names, from which I case by case can select). |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
data validation - select multiple options?
In addition to Dave's suggestion, there's a sample file here that also
uses programming: http://www.contextures.com/excelfiles.html Under Data Validation, look for 'Select Multiple Items from Dropdown List' A. wrote: Is it possible to create a similar function like data validation, from which I can select multiple options? (Background: I need a list of many names, from which I case by case can select). -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
From several workbooks onto one excel worksheet | Excel Discussion (Misc queries) | |||
selecting multiple sheet tabs and open another workbook | Excel Discussion (Misc queries) | |||
data validation list should have opt. to select based on criteria | Excel Worksheet Functions | |||
named range, data validation: list non-selected items, and new added items | Excel Discussion (Misc queries) | |||
Effect of Conditional Formatting, Data Validation | Excel Discussion (Misc queries) |