Removing Names from a list

Vehemence

New Member
Joined
Jan 26, 2005
Messages
2
Hi I am trying to take a list of names and than display them in individual cells by selecting them from a drop box, however I choose each name I want them to be removed from the list. My formula looks like this, but I am sure I am probably way off base.

=IF((C1:C205=C207)," ",0)

Here are the things I am trying to tackle.

A) Create a list of people
B) Have a drop down of that list
C) As I pick names remove them from the list so I cannot choose a name twice.

Please for the love of god help me before I wound my desk :)
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
How are you creating the dropdown?

Is it on a worksheet or a userform?

The only way I can think of doing what you want would be to use a combobox on a userform with some VBA code.
 
Upvote 0
Vehemence said:
Hi I am trying to take a list of names and than display them in individual cells by selecting them from a drop box, however I choose each name I want them to be removed from the list. My formula looks like this, but I am sure I am probably way off base.

=IF((C1:C205=C207)," ",0)

Here are the things I am trying to tackle.

A) Create a list of people
B) Have a drop down of that list
C) As I pick names remove them from the list so I cannot choose a name twice.

Please for the love of god help me before I wound my desk :)

See,

http://www.contextures.com/xlDataVal03.html
 
Upvote 0
Hi, I've created this sub,try it,

Before you do it few things you need to do.
1. Create a column with all the names in it.
2. Select a cell where you want to see you list.
3. Keeping the selection, go to data>>Validation>>Validation criteria as List>>Select the source as your list of names.
4. Replace the references in the following code
B4 is the cell where your list is.
C4:C8 is where your names are
and paste this code in the sheet you're working

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$4" Then
Dim myrange As Range
Set myrange = Range("C4:C8")
Dim c As Object
For Each c In myrange
    If c = Target Then
    c = ""
    c.Select
    Selection.Delete Shift:=xlUp
    Target = ""
    End If
Next c


End If
End Sub
 
Upvote 0
Man you guys are awesome. In two days I have went from no excel knowledge to making people in the office look like monkeys :) Heck in about 2 weeks I might even be able to help other people with stuff.
 
Upvote 0

Forum statistics

Threads
1,214,786
Messages
6,121,546
Members
449,038
Latest member
Guest1337

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top