Data Validation List - Automatically Update Cells Where Used
Apr 15, 2011
On Sheet2, data validation is applied to cells D21:D70 to limit data to values to a list, which is a named range on another worksheet. There are ranges on two other worksheets with the same data validation rule. The range for the list is ‘Sheet1’!D12:D26 (which is named “Processes”).
On Sheet1, the user enters a list of their processes. Then on Sheet2 (and the other sheets where the data validation is applied), they select one of the processes from the list. This all works fine until they go back to Sheet1 and modify one of the previously entered values.
For example, "Brush Teeth" is entered as one of the processes on Sheet1. It is then selected on Sheet2. Then, the user goes back to Sheet1 and changes the value to "Brush Hair." When you return to Sheet2, the value is still "Brush Teeth." It can be manually be changed by selecting “Brush Hair” from the drop-down list (“Brush Teeth” is no longer available), but it doesn’t automatically update.
Data validation was applied to a single cell (A3) and the list was on the same worksheet (B1:B3).
Option Explicit
Private oldValue As String
Private Const DVCell As String = "A1"
Private Const dataList As String = "B1:B10"
[Code]...
'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in.
On Sheet2 (I assume I need to add this code to every applicable sheet), I tried editing the first part of the code as follows (changes in bold), but when I click on any cell on Sheet2 that has the data validation rule applied, VB returns the error “Run-time error ‘1004’: Method ‘Range” of object ‘_Worksheet’ failed.” If I go into the debugger, the second instance of “If Not Intersect(Target, Range(dataList)) Is Nothing Then” is highlighted.
[Code] .....
View 9 Replies
ADVERTISEMENT
Nov 19, 2009
I already have various dependent validation lists established using the INDIRECT function.
Now I want to figure out how I can automatically change the selected values given the selected list. For example:
Cell D11 is a validation list with options: Boat/Car
Cell D15 is a validation list where if D11 = Boat the options are Catamaran/Sailboat/Tugboat. If D11=Car the options are Convertible/Sedan/Midsize.
The problem is that if D15 is preselected as Sailboat, for example, and you go back and change D11 to equal Car, cell D15 remains an option from the Boat validation list. I would like it to automatically update as the 1st item on the car validation list.
View 9 Replies
View Related
Jun 20, 2008
I can't seem to find a way to make a data validation list automatically show the first item in the list rather than showing blank.
View 10 Replies
View Related
Jul 6, 2006
I've been using Dave Hawley's "Excel Data Validation List - Automatically Add to a Data Validation List" in my wb with great results, but now I am going to use a secondary wb to keep the Data Validation List and herein lies my problem. I lack the VBA skills to be able to modify the code and references so that when I input into the primary wb the data is updated in the secondary wb. The Primary wb is an xlt that I'm developing, each time a new xls is opened from the Primary.xlt, vba in the Primary.xls opens Secondary.xls. Secondary.xls has a named range "Names" which I wish to be able to update when data validation is performed in Primary.xls per the sample on this web site.
View 3 Replies
View Related
Apr 16, 2007
I'm trying to implement the feature from this great Ozgrid 'how to', and it's working for the most part, but the VBA falls over here...
Private Sub Worksheet_Change(ByVal Target As Range)
Dim lReply As Long
If Target.Cells.Count > 1 Then Exit Sub
If Target.Address = "$F$10" Then
If IsEmpty(Target) Then Exit Sub
If WorksheetFunction. CountIf(Range("Dept"), Target) = 0 Then
lReply = MsgBox("Add " & Target & " to list", vbYesNo + vbQuestion)
If lReply = vbYes Then
Range("Dept").Cells(Range("Dept").Rows.Count + 1, 1) = Target
End If
End If
End If
End Sub
Basically, I have a tab which contains 2 lists. One in Column A and one in Columb B. I want the corresponding dropdowns on a different sheet to allow entry of anything that's not on either of the lists.
I can get it to work if I place the lists on the same sheet as the main 'form', but I need to keep them on a seperate sheet (and as the 'how to' suggests the lists can be on any sheet, I thought it'd work 'out of the box').
View 9 Replies
View Related
Mar 5, 2008
trying to incorporate this in to a workbook in which name range is on a separate sheet to where the validation cell is but with no success could any one tell me how to adjust it so that it works,
View 8 Replies
View Related
Apr 7, 2014
I'm trying to create a spreadsheet that has a data validation in it. I have a drop down list that has to options to select; Yes and no. Every time I create a new row to add more information I have to go through the process of creating a new data validation for for each cell in this coloumn.
Is there anyway of creating a way that every time I insert a new row, a data validation list box will appear in the coloumn that I want it in?
Sample Workbook: datavalhelp.xls
View 3 Replies
View Related
Oct 27, 2009
I am trying to learn the concepts, then apply them to a set of actual worksheets. I am trying to use named ranges from one worksheet in another worksheet. The named ranges need to expand. Although I can get the add data to a dummy worksheet to work within the same worksheet and I can even get a named range to work in the foreign sheet.
My problem is, when I can end up adding the additional data to the named range, it will only add one name. I have a number of named ranges that are referenced on various worksheets. The idea is, certain named ranges should be able to expand so I donft have to type them all in. (There could be hundreds of manufacturers or models.) I would also like them to be able to sort themselves after additional names are added to the named ranges. I would also like them to auto populate as well. I am using Excel 2003 SP3 (11.8307.8221). I have enclosed the file. Drop down lists (named ranges) are on the worksheet called DROP DOWN LISTS (LOCKED) **ITfS NOT CURRENTLY LOCKED**.
The data validation issues are on the worksheet called Rev7.0 Wood (Basic Sheet.) There are other instances to use these, but I hope to learn to do them myself on the other worksheets. Of particular interest is Column f.................
View 3 Replies
View Related
Oct 12, 2011
I have a dropdown list in C24:C50 (=CategoryList) with data validation and a sub list in D24:D50 (=ItemList) with data validation. I am looking for a way to have code automatically run after selecting an item in the data validation dropdown list in column C.
Example; I click on C24 and make a selection. I what it to trigger code that would move me to D24 and open up the data validation list in D24. After the selection in D24 I would like it to move me back and down 1 row to C25. I have not found anything directly related to this but I have found that code can be run after a selection in a valadition list.
View 2 Replies
View Related
Jan 2, 2007
I've created multiple ranges in a sheet named ' Schedules' that all use one Data Validation list. The list source is a Named Ranges called 'AbbNames', which points to a column ($S) on another sheet named 'Students'.
AbbNames is simply a list of student names--that are values; AbbNames does not contain a formula. However, AbbNames was created with VB code in the Worksheet Change Event. The code is:
Dim rng As Range
Dim rng1 As Range
If Target.Count > 1 Then Exit Sub
On Error Resume Next
Set rng = Target.Dependents
On Error Goto 0
If Not rng Is Nothing Then
Set rng1 = Union(rng, Target)
Else
Set rng1 = Target
End If
On Error Goto errHandler
If Not Application.Intersect(rng1, _
Application.Range("Abbreviated")) Is Nothing Then
Application.EnableEvents = False
Application.Range("AbbNames").Value = _
Application.Range("Abbreviated").Value
End If
errHandler:
Application.EnableEvents = True
If Err.Number <> 0 Then _
MsgBox "Error occured " & Err.Number & vbNewLine & _
Err.Description
Note that students' names were originally concatenated in a column named 'Abbreviated' located in column G.
(this code creates the 'AbbNames' data in column S and updates the data if data is changed in 'Abbreviated'--if data is originally changed in columns A and B, which are firstname and lastname)
To make a long story shorter, I needed a column of concatenated names that were values--not calculated--to base the listboxes off of in the Schedules sheet. Validation list boxes can't be based off of calculated columns, right??
However, the listboxes do NOT work. When a user clicks on the drop-down arrow, Excel pauses for about 20 seconds (the initial time) and then shows nothing in the list except a blank field. When the blank list is clicked, the top name from 'AbbNames' is entered. However, no names can be seen or selected in the list box.
View 9 Replies
View Related
Jul 21, 2008
i have a list called "parts". i want this list to be updated everytime a new part # is entered into the list cell. i can get it to work in one cell. i have been able to get it to work in up to 6 rows, however i want it to work in up to 50 rows. here is the vba code i am using
Private Sub Worksheet_Change(ByVal Target As Range)
Dim lReply As Long
If Target.Cells.Count > 1 Then Exit Sub
If Target.Address >= "$D$3" Then
If IsEmpty(Target) Then Exit Sub
If WorksheetFunction.CountIf(Range("parts"), Target) = 0 Then
lReply = MsgBox("Add " & Target & " to list", vbYesNo + vbQuestion)
If lReply = vbYes Then
Range("parts").Cells(Range("parts").Rows.Count + 1, 1) = Target
End If
End If
End If
End Sub
i am using insert>name>define for the list and this is what i used for that
=OFFSET(lists!$A$1,0,0,COUNtA(lists!$A:$A),1)
like i said, it will work for d1-d6, then it stops working.
View 9 Replies
View Related
Mar 14, 2007
I have a drop down list in a column where i want the user to select one of the options which is an action to be taken. The actions would be dependant on the what the persons performance rating was, so for example, if the person has Exceeded their performance targets, the only 2 applicable actions would be High Potential and Emerging Talent. Please see attached file for the actions related to the peformance rating.
I want the validation list of actions to change accordingly depnding on what the persons performance rating is. So in the example attached, i want to look up the rating in column A and have the options appear according in the same row in column B.
View 9 Replies
View Related
Mar 5, 2009
In sheet 1, there are two columns, Category and Subgroup. The cell validation for Category is pulled from the category list on sheet 2. Basically, what I want to happen is depending on what is selected as the category, only the related sub-groups would be populated in the sub-group validation dropdown list. In other words, if Fruit is selected as the category, I only want Apple, Orange, Pear, Banana, etc to be in the validation drop down list for the sub group. If vegetable, then only Corn, Green Bean, Cucumber, and Peas should be shown.
I've included two options for the relationship list as I'm not tied to either style and not sure which would be easier to work with.
View 9 Replies
View Related
Aug 15, 2008
I have a list and set cells with a List Data Validation so you can choose them from a drop down menu. What i want to do is when you choose one of the option is the cell next to it come up with other option relating to the previous. E.G. I choose John Smith in cell A1 as a manager and in A2 a list of his team appears.
View 4 Replies
View Related
Aug 21, 2009
I have a list in one worksheet which comes from "=SALESMEN!$D:$D" but the list is extremely long with blank values. How can I make the list only show values from column D which are non-blank?
Currently the list goes up to 30, however I want to use all of Column D from the SALESMEN worksheet, that way if I add to it, the names will automatically be added to the list in the other sheet.
View 10 Replies
View Related
Feb 22, 2014
Somehow I cannot seem to count data in a column (e.g C) where cells are populated from a data validation list. The same formula works when I manually populate the same data in another reference column (e.g J). I have tried both COUNTIFS and SUMPRODUCT but they dont seem to work
=SUMPRODUCT(--($C$4:$C$9995=AB3),--($G$4:G$9995
View 2 Replies
View Related
Oct 1, 2009
I need a macro which will lock the cells after data is entered in the cell once. Cell should should be only edited after a password is provided. I found the following macro but the problem is that it's not locking the cells where I have Data Validation List :
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("A1:M10000")) Is Nothing Then 'set your range here
ActiveSheet.Unprotect Password:="1234"
Target.Locked = True
ActiveSheet.Protect Password:="1234"
End If
End Sub
View 9 Replies
View Related
Mar 18, 2008
how to make all cells displaying an item from the list source update with new information added to list source.
Example:
Cell "A1" on worksheet 2 displays the 3rd slot of information from list source on worsheet 5. I want cell "A1" on worksheet 2 to update when the list source information in the 3rd slot on worksheet 5 is changed.
Notes:
The list is set up by naming the columns on Worksheet 5 and is set as a validation list on the other worksheets. So on Worksheet 2 column "A" has the validation
VB:
AutoLinked keywords will cause extra spaces before keywords. Extra spacing is NOT transferred when copy/pasting, but IS if the keyword uses "quotes".
List=(Coulumn A 's name on worksheet 5)
View 9 Replies
View Related
Apr 24, 2014
How I can Removing the Black cells in list in data validation ?
View 1 Replies
View Related
May 14, 2009
What I am trying to do would appear to be very simple. I am trying to build a quotation form for our sales guys to use. I would like to use a drop down list with the list of products in, which I have created using a list in a second sheet and then using a data validation drop down list.
What I would like to achieve is the sales person selects the product (of a list of only 14) from the list and excel to automatically fill in the two columns to the right with the model no. and also the price.
Would it be possible to use an IF statement as there are only 14 products to choose from? Is there a better way of doing this? I have created the lists of model numbers and prices in the second sheet alongside the product name which the drop down list sources from.
View 10 Replies
View Related
Mar 10, 2008
when you choose Data Validation for a specific cell, you can choose list. Once you have chosen list for "Allow", you can select the source cells for what will be in the drop-down menu. I want to be able to use VBA (or just use Excel) to modify those source cells.
For example:
There will be 3 lists with drop-down menus using Data Validation.
List 1:
Choose first option in list -> List 2 uses source A
Choose second option in list -> List 2 uses Source B
etc...
List 2:
Choose first option in list -> List 3 uses source C
Choose second option in list -> List 3 uses source D
View 11 Replies
View Related
Nov 18, 2008
I have a list (external), which will be updated every month from an external source with new numbers and possibly a new size. This will be a count of services people use. On a 2nd sheet I need to allocate a cost to these services (pivotdata). This works fine if the list stays the same size, but it most probably won't so I need it to update automatically, not manually extending the list on the 2nd sheet. In brackets are the named ranges of the data in the spreadsheet.
View 5 Replies
View Related
Mar 13, 2013
Is there a way to automatically create list of the Tab names, and have it automatically update when new tabs are added?
View 2 Replies
View Related
Sep 24, 2007
I have created a validation list which automatically adds any new values a user enters.
Is there any way of sorting the validation list every time a new value is added to the list?
View 9 Replies
View Related
Jul 16, 2014
i have a validation list of about 100 items. Is it possible that on tabbing into the cell the validation list can automatically open and as I start to type, it will take me towards the right list item?
View 1 Replies
View Related
Aug 4, 2006
I want to do now is link the code below to a drop-down menu I have created on one of the sheets in the workbook. I created this list using data validation and declared this drop-down menu as MIndex and the values to choice from are 0,1,2.
Does anyone know how I can link this drop-down menu to the macro. So basically once the drop-down menu is activated run this macro.
Sub SumMonthlyVol()
Dim wSheet As Worksheet
For Each wSheet In Worksheets
Select Case UCase(Left(wSheet. Name, 2))
Case "AJ", "CJ", "PJ"
If (MIndex = 0) Then
wSheet.Range("L52") = "= SUM(R33C4:R50C12)"
Else
If (MIndex = 1) Then
wSheet.Range("L52") = "=SUM(R34C4:R50C12)" ......................
View 9 Replies
View Related
Apr 21, 2014
In cell H5 there is list of dates and in H7 there is codex, based on these two conditions in H11 a data validation list should be populated from the code_sheet using column B. The populated list should be unique entries, as the column B in code_sheet has duplicates.
View 9 Replies
View Related
Apr 5, 2009
Make a Data Validation dropdown list that also enters a range for cells, for example:
Kitchen High Upto 100 Easy Blank 2 Daily >6 hrs Medium >1 week
Lounge Low Large Easy Blank 0 Daily >6 hrs Medium >1 month
Bedroom Low Large 100 Easy Blank 1-3 Daily 1-3 Low >1 year
Bathroom High Upto 100 Easy Blank 0 Weekly 1-6 Low <1 year
I can make a dropdown list for:
Kitchen
Lounge
Bedroom
Bathroom
But if I select "Kitchen" I would like it to enter the rest of the cells in that row:
Kitchen High Upto 100 Easy 2 Daily >6 hrs Medium >1 week
The total number of rows I use is 10, and the number of items in the dropdown list will be 30.
The data in the cells 2 to 10 does not change from that first set to its data menu name.
View 4 Replies
View Related
Dec 13, 2009
I'm using Excel 2007. I would like to seek some advise on how i may update cells after selecting a month from a drop down list.
i have created a simplified version of what i intend to have. One the 1st tab 'Cash Budget 2009', i have filled up a table with numbers, sorted by months. On the 2nd tab 'Dec09', i would like to create an expense table, to be able to be selected by month. So i have created a drop down list based on the months that are created in the 1st tab.
Upon selection of the month from the drop down list, i would like the cells to display (fetch) the data from the 1st worksheet. It would also be helpful if the name of the 2nd tab can be updated to read as the month that is being selected.
View 4 Replies
View Related
Dec 26, 2012
I've created seven names in my data validation source list on Sheet 3 in the following range of cells, A2-A7. My data drop down validation list is located on Sheet 1, A2 in the same workbook. I would like to trigger a macro based on the name I select in this drop validation drop down list that will fill out an address, telephone number, and email address in the following cells next to my data validation drop down list on Sheet 1: B2, B3, and B4. I want it to be designed so that users will select a name and have that person's corresponding address, telephone number, and email address fill right next to their name on the same sheet.
View 6 Replies
View Related