Help with an editable dynamic drop down list

aenamorado

New Member
Joined
Jun 14, 2012
Messages
1
Hello, first of all thanks for dropping by.

I have the first drop down list that allows you to select 1 of 4 categories, and based on the category selected, it will then allow you to select the specific name within the category. Right now, I am trying to give the user a chance to input additional items into the category.

It currently does add on to the list through the drop down menu. The problem I have with my program is that but it does not add into the specific list that has been selected by the first drop down. I would be grateful for the assistance.


I followed the steps outlined in this link:
http://www.contextures.com/excel-data-validation-add.html

Currently working with this code, but I don't know how to work in my dependant lists into it



Code:
Private Sub Worksheet_Change(ByVal Target As Range)On Error Resume NextDim ws As WorksheetDim str As StringDim i As IntegerDim rngDV As RangeDim rng As RangeIf Target.Count > 1 Then Exit SubSet ws = Worksheets("Lists")  If Target.Row > 1 Then  On Error Resume Next  Set rngDV = Cells.SpecialCells(xlCellTypeAllValidation)  On Error GoTo 0  If rngDV Is Nothing Then Exit Sub    If Intersect(Target, rngDV) Is Nothing Then Exit Sub      str = Target.Validation.Formula1  str = Right(str, Len(str) - 1)  On Error Resume Next  Set rng = ws.Range(str)  On Error GoTo 0  If rng Is Nothing Then Exit Sub    If Application.WorksheetFunction _    .CountIf(rng, Target.Value) Then    Exit Sub  Else    i = ws.Cells(Rows.Count, rng.Column).End(xlUp).Row + 1    ws.Cells(i, rng.Column).Value = Target.Value    rng.Sort Key1:=ws.Cells(1, rng.Column), _      Order1:=xlAscending, Header:=xlNo, _      OrderCustom:=1, MatchCase:=False, _      Orientation:=xlTopToBottom  End IfEnd IfEnd Sub

</PRE>

</PRE>


</PRE>
 
Last edited:

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Watch MrExcel Video

Forum statistics

Threads
1,130,051
Messages
5,639,773
Members
417,112
Latest member
PachRedoc

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
Top