Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
A.
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
RagDyeR
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Debra Dalgleish
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
From several workbooks onto one excel worksheet steve Excel Discussion (Misc queries) 6 December 1st 05 08:03 AM
selecting multiple sheet tabs and open another workbook Bannor Excel Discussion (Misc queries) 5 November 25th 05 02:38 AM
data validation list should have opt. to select based on criteria be Excel Worksheet Functions 1 September 15th 05 01:05 PM
named range, data validation: list non-selected items, and new added items KR Excel Discussion (Misc queries) 1 June 24th 05 05:21 AM
Effect of Conditional Formatting, Data Validation Bill Sturdevant Excel Discussion (Misc queries) 1 January 25th 05 11:50 PM


All times are GMT +1. The time now is 12:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"