VBA To Choose The Source Cells For A List With Data Validation
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
ADVERTISEMENT
Apr 8, 2014
I try to find a solution (with or without macro) to assign different ranges named "Failure_C..." in a data validation source depending on the value of another data validation list (32 values called)
I started in the Data Validation List Source to fill in IF function but 32 inputs are not accepted and too much caracters in the source.
The formula is starting like that:
=IF(A57=$M$78,Failure_C01,IF(A57=$M$79,Failure_C02,IF(A57=$M$80,Failure_C03,
IF(A57=$M$81,Failure_C04,IF(A57=$M$82,Failure_C05,
IF(A57=$M$83,Failure_C06,IF(A57=$M$84,Failure_C07............
View 2 Replies
View Related
Jan 12, 2010
Is there a way to use Data Validation that will pull data from a source list and also be able to type in additional data or just new data in same cell?
View 3 Replies
View Related
Apr 1, 2009
Not sure if this can be done, still a rookie at this stuff. Everything works but can something be wrote into code too change list source?
View 5 Replies
View Related
Jun 25, 2007
Is it possible to have a list from a different workbook as the source list for a validation dropdown on a cell? If so, what is the syntax.
View 2 Replies
View Related
May 6, 2009
i just want to generate a list validation where source resides in another workbook?
i have used named range concept ?but not working can anyone help..
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
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
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
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
View Related
Apr 28, 2014
I am currently creating a form to hold 2 drop down lists that change depending on the selection in the first one. I had never done this before and taught myself and got it to work minus one problem. As soon as I input the formula under the Data Validation the error: "The Source currently evaluates to an error. Do you want to continue?" pops up. Right now the formula works except for the last 6 options in my first drop down. When I select them nothing pops up in the 2nd drop down menu. I have double checked and triple checked that I have no spaces or anything in my LIST on worksheet 2 or any of the names are input correctly.
A7 is the first drop down - PROPOSED
B7 the second. - ITEM #
Lists and data to populate the lists are on worksheet 2 with the "List" at the bottom of worksheet 2...
View 1 Replies
View Related
May 26, 2014
I have a drop down list that shows phrases for different math functions, like "divide by 2," "divide by 4," divide by 8," etc. When one of these items is selected, I want it to perform that specific calculation on a range of nearby cells.
However, I also want the user to be able to see the original value of the cells if they select "show original value" from the drop down list.
I have attached a workbook as an example. I think macro would probably work best.
oz_list_math.xlsx
View 5 Replies
View Related
Jul 16, 2009
I have several cells with data validation's drop Box. Every data validation uses a range name as source (myColorList). Here goes the hard part: I need a new value inside the dropBox list, but The problem is that I can NOT modify the "myColorList" range.
-- Is there any way to build up the dropbox source using the range name and the new value? Something like
View 2 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
Aug 23, 2013
I have a spreadsheet listing various pieces of computer hardware, software and mobile accessories, etc with costs attached.
I have created a dropdown list of staff profiles eg a sales representative, finance assistant, IT administrator.
What I want to do is get Excel to pull the data through from the data sheet, to a printable summary output form (something you could also cut and paste from). For example, a sale rep would need to be set up with a laptop, laptop case, mobile phone, etc, so when you select Sales rep from droplist, I want that action to pull all the associated data through to the summary form. Similarly, a Finance assistant would require different kit , perhaps a desktop PC , monitor , etc.
Next to my data I have created columns with "Y" for yes in cells containing kit that match the staff role requirements, but I am not sure of the best way to pull this together.
View 3 Replies
View Related
Mar 25, 2014
Say I have Source Workbook X 1, and Destination Workbooks X 4. The Source workbook contains a number of lookup values. I want the lookup values to be maintained in the single Source workbook, and I want this workbook to remain closed when the end users are using their Destination workbooks. It is critical that certain cells in the Destination workbooks have validated data in order for formulas and summarizations to be correct.
I'm happy if the Destination workbooks contain a lookup worksheet (perhaps hidden). In short, I'd like the contents from the Source workbook, Lookups worksheet, to just be replicated "as is" into the Destination workbooks, Lookups worksheet. I then want to do my data validation from that worksheet, which of course is open (data validation appears to only work with open workbooks).
I've investigated the techniques in this link: [URL]
Questions:
1) Are the techniques in that link about the best approach? i.e. an external link plus array formulas?
2) A blank cell in the source workbook (text column but formatted as General) is resulting in a zero in the external link. How can I make the external link exactly match the text as entered in the source workbook?
View 5 Replies
View Related
Feb 15, 2014
I have 2 columns First Name & Surname. What I want to do is create a data validation list on the surname which results in the 2nd data validation list only showing the first names which link to one of the surnames.
i.e. If I selected Smith in the 1st validation list then I would only like to see 'Paul' as an option in the 2nd list
First Name
Surname
Paul
Smith
Paul
Jones
Tony
Phillips
View 1 Replies
View Related
May 15, 2009
I have tried putting in the Row Source in the Properties of ListBox1, (A10:A13) but the range is in another worksheet called Codes. So when I run the Form the list box shows the range A10:A13 in the current sheet. I have named the data list SP but when I punch that in it will not accept it in the Row Source. How can I lock in the source data in the list box so it only shows the named range SP.
View 9 Replies
View Related
Aug 1, 2009
I am looking to have the Cells that I have applied a Dropdown List to update with the changes that I make to the list itself.
Example:
If I were to validate a list with a range of a1:a3 using "Bob" "Sarah" "Bill" and then apply that list to B:B and randomly select from the three names running the length of B:B, I would want that when I go back to A2 and change "Sarah" to "Linda" that every "Sarah" that I have selected using the drop down will update to say "Linda"
I hope that I am explaining myself clearly and in a simple context.
View 9 Replies
View Related
Aug 27, 2009
I have a workbook with two spreadsheets, one blank and one with a Header row and a list of employee names and random dates that will continue to be added to at the bottom per a copy and paste.
What I need is to have a form dropdown on the blank sheet (per a cell reference) that shows employee names and dates that has that name next to it in the data sheet.
The employee names are in three columns Last, First, and Middle and the dates are in a separate column (A).
I guess I need a VLOOKUP that can take the range and pull into the dropdown the employee name and every date associated with that name.
View 10 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
Jun 15, 2007
I'm trying to use data validation to restrict the user to only selecting values in a list which I create. Right now, the list is a named range. I'd like to get rid of the range and just use a named list. I create a name using the following as my list.
Insert > Name > Create
Name: Fruit
Refers to:
banana,apple,orange
When I try to use the name Fruit in my data validation, I get the message "The List Source must be a delimited list, or a reference to single row or column." I thought my name "fruit" was a delimited list.
View 4 Replies
View Related
May 11, 2009
I have a spreadsheet called contacts which is as it says, I have another sheet called project management, I want to have a drop down list which refers back to the contacts spreadsheet, it this possible as they are two different files?
View 4 Replies
View Related