Validation Lists Using Vba
Mar 30, 2007
I need to find a solution that will prevent users from pasting values into cells that do not match values in a named range or validation list.
I think the best method would be to have it trigger with a SheetChange event. I would like it to check to see if the enteredpasted value(s) in a range of cells is equal to one of the following:
K
1
2
3
4
5
6
7
8
If it does not, I want the cell cleared and a message box shown.
I am sure this is simple, stock code for someone, but I am teaching myself vba and am fairly green. Does anyone have this handy in thier code library?
View 13 Replies
ADVERTISEMENT
Sep 26, 2007
I would like to know if it's possible to populate a data validation list based on what is selected from 4 validation lists?
for example:
On sheet1:
If 'Group1' is selected from data validation list1 then data validation list5 will show a list of all items from Group1. If 'Group2' is selected from data validation list2, then data validation list5 will display all the items in 'Group2'...
(I do not want to use a combo box for this)
View 9 Replies
View Related
Jul 19, 2014
I will have users filling out cells (e.g. on Input sheet) and want to cascade the drop-down lists based on selections made. The basis for these selections is on the LISTS sheet.
So for Area, if they choose AREA1, then the Main Activity should only have 1,2,3,4,5 as available drop-down options and if they choose 1, then Secondary Task should only have A or B as options in that drop-down and finally Supervisor option should only be XX.
My question is, is there any quick way to create these cascading drop-down lists from the structure I have currently in place on the LISTS sheet. Or am I going to have to rearrange the data on a separate sheet? I will have up to 40 'AREAS' with dependent selections.
View 10 Replies
View Related
Oct 28, 2008
How to make a drop-down list appear when a cell is double-clicked as opposed to just clicking on the box to the right of the cell that appears when you click in the cell? I want to be able to use the ability to drag-copy the cell contents from the little square in the bottom-right of the cell, but cannot do this when there is a validation drop-down list!!
View 14 Replies
View Related
Jul 3, 2008
I have been going around in circles trying to work this one out... I have set up my "Work Packages" sheet ready to use with an excel timesheet. I have entered all ......
View 9 Replies
View Related
Nov 5, 2006
I've create a very large list using the procedures described in MatchingList sample workbook. For the most part everything works great however, there are about 4 list where when I name the range to capture the assoicated data, the name does not stick. I.E., I add a name with the title in $F$1 as "Address 1" and specify the range as $F$2:$F$8. When I select "Address 1" from the first cell and then go to the next cell to select the options, nothing is there. When I go to any of the cells below $F$1 I do not see the range name in the Name Box. Can someone explain why some of the names work and others don't.
View 2 Replies
View Related
Sep 22, 2008
I have a very large spreadsheet that I work with on a daily basis. The main portion of the spreadsheet is broken down into weekly sections (for example, columns GF thru GM contain data sections for one week, which then repeats with the next set of columns, etc.). Below these weekly sections are detail and summary sections for all the data entered above. In the main weekly portion, each week contains a size drop-down list which calls to size information in the detail portion below. Recently, the data validation lists have started disappearing. By disappearing, I mean that the data validation for the cell no longer exists on a large portion of the list cells. I have tried recreating all of the data validations, saving the file, and re-opening it, and when I do, they've disappeared again. I have no idea what to do at this point. The functionality of the spreadsheet is crippled without the sizing drop-down lists (for various lookup reasons).
View 14 Replies
View Related
Oct 14, 2008
See the attached example. I have created a dependent data validation. The list available in B2 is dependent on the item chosen in Cell A2.
What I would like to know is how do I expand this validation down columns A and B. I don't want to have to add the validation in each cell individually!
View 4 Replies
View Related
Jul 1, 2009
I am working on a spreadsheet and using a validation list which is working fine. However i know want to have multiple validation lists that change depending on what you choose from the first one.
For example in the first list it would say, Vegetables, Frozen, Fruit etc
If i chose Fruit in the second list i want it to then list Bananas, Apples etc etc.
View 9 Replies
View Related
Feb 8, 2010
Can you make validation lists longer than 9 items?
View 2 Replies
View Related
Dec 31, 2012
I cannot seem to add more dependents using this code. I think it is in the "If / then / else" structure that it is limited to only those three "groups". But I need to be able to add at least one more dependent list to the code.
View 4 Replies
View Related
Jul 22, 2014
I have a dashboard with 2 validation dropdown lists - 1 for Brand name (text) and one for month (mmm-yy) which go and run various pivots, etc.This works perfectly - except the dropdown list is so small its unreadable.
So I've tried a workaround using Combo boxes which I found here:
This does work, but when I select a month on the 2nd Combo Box, it is then displayed in number format eg, 41699. I've tried changing the format to mmm-yy but it keeps displaying as a number.
Is there any way I can make it display as mmm-yy?
View 14 Replies
View Related
Mar 20, 2009
I have attached a file where I’ve made some dependent validation lists. When the first box is changes it clears the last 2 with this bit of code
View 2 Replies
View Related
Aug 26, 2006
From the Excel Toolbar - Data/Validation - I'm successfully using a validation list [drop down arrow] to be able to choose from a list and have whatever value I choose entered into the cell. So far so good. Everything working fine.
Here's the thing though, the list I'm referencing is a column with 50 rows. Sometimes there are many items in the column - up to 50, and sometimes only 3 items depending on other variables in the spreadsheet.
Because the list is referencing the entire 50 rows in the column (only way I know how to do it), during times when the column has only 3 items (3 rows), the drop down still shows a bunch of blank spaces (like 47 of them - tons of white space with a scroll bar window that runs down beyond where one can see), which is awkward (strange looking).
How do I program the validation list to only show as many cells within a range that have actual values within the cell, or where <> "" ? Or, in other words, to leave all blank spaces found in the list = NOT SHOWN.
View 9 Replies
View Related
Sep 10, 2009
I am trying to make two dependant lists in Excel. Using data validation lists, is it possible to, for example, select a country from one list, then select a city in that country from another list. For example, if I select France from one list, I only want the list of cities to include French cities, rather than the entire list of cities in the list.
View 2 Replies
View Related
Apr 23, 2007
is it possible to first make an IF check on a cell and then as one of the results (true or false) to give the cell a Validation List?
So for instance if the IF will come out true, the Cell would just diplay some text and if the IF will come out false, the user will be able to choose something from a Validation Drop-down List?
View 9 Replies
View Related
May 26, 2006
I have an Excel spreadsheet with two lists of data, the first is a list of groups and the second is a list of sub-groups, each group containing a number of sub-groups, each sub-group being unique and belonging to only one group.
Elsewhere on the sheet, I have used Data Validation (using 'list') in 2 columns to provide a drop-down selection in cells which the user must complete. The first column refers to the first list (groups), the second column refers to the second list (sub-groups).
However I would like to make the values which appear in the second drop-down list dependent on the value which has been selected in the first. That is: make the user choose a group in the first column and then make the choice of available sub-groups in column 2 restricted to those sub-groups which belong to the selected group.
View 9 Replies
View Related
Oct 4, 2006
Is there any way to make Hack#24 work with more than 5 lists? I followed the information in the book and was able to get 5 secondary cells to have a drop down list that was dependent on the primary cell selection (also from a drop down list). But when I tried to apply this to the next six primary and secondary cells it would not work.
View 5 Replies
View Related
Jan 21, 2008
I have a spreadsheet where I keep all records of all the rock climbing I have done.
I am after a way of choosing a climbing area either by data validation or combo box (already set up as a named range) and then the climb names available in another validation list shows only those from that particular climbing area.
From what I have seen from various web sites it seems the climbing area names need to be in a unique list (is this correct). My sheet looks like the following:
Column A | Column B (climbing area) | Column C (climb name)
Date | Mt Arapiles | Agent Orange
Date | Mt Arapiles | Auto Da Fe
Date | Morialta | Asgard
Date | Morialta | Al Sirrat
Date | Buckaringa Gorge | Agent Orange
The name in the climbing area column will be repeated often.
The climb name should be unique to each climbing area, but the climb name my be repeated in another climbing area.
The climbing areas are anamed range on a separate worksheet.
The details of the climbs has all the details of the climb i.e. the Climb Name; Climbing Area (VLookup); Grade ; Distance ; Single or Multi Pitch ; Lengths of each Pitch.
I already have a working example of the spreadsheet (220KB) but it currently works backwards i.e. I use validation to find the climb name and then this uses the INDEX function to return the climbing area.
I would like to be able to choose the climbing area and then the next available choices would be limited to that climbing area.
View 3 Replies
View Related
Aug 12, 2014
I have a question regarding linking the content for data validation lists stored in a different workbook.
The scenario is as follows: I will have say 50 users using a template which contains various dependent drop-down lists. These lists work by using the INDIRECT function which calls the correct drop-down based on the previous selection. The drop-down entries are currently stored in named ranges on a hidden worksheet in each user's file.
However, if I need to make a change to the content of these lists, I will have to open all 50 files individually and change each one. So I'd like to have a master file to which all the templates would be linked which would contain the entries for each drop-down. So when I update a list in the Master file, it would automatically update the drop-down lists in each user's template with any additions deletions.
My question is, how do I create the links between the user templates and the master and have it so that the list ranges will be dynamic. So if a drop-down list contains say 10 entries and I add 2 more in the master, that those 12 now appear in each user's template?
View 3 Replies
View Related
Aug 28, 2007
I have a question regarding the data validation lists. What i have is 4 different lists
Department
Assays
Instrument
Manufacturer
What I want to do is...once a user chooses a department, he gets a list of assays done in the chosen dept. and also a list of instrument used by the dept and a list of manufacturers
I used the examples shown here
http://www.contextures.com/xlDataVal13.html
http://www.contextures.com/xlDataVal02.html
and was able to succeed in creating dependent lists to some extent...I am attaching whatever I have able to accomplish so far, which is able to pull up the assay list based on the dept. ...but am confused as to how to get the Instrument and Manufacturer list at the same time .....please choose 'Chem 2" from the dept list to see what I have managed to do so far
View 11 Replies
View Related
Oct 22, 2007
I am creating a spreadsheet i want it to be that i make a selection from a drop down and this will then narrow the options available in the next drop down. Say box one you select 'half day' and then the next drop down menu will automatically loose all the data for a 'full day' and only show half day information such as costs for food and room bookings ect. i have made the drop downs but im not sure what to do next.
View 3 Replies
View Related
Oct 27, 2008
Sheet1 is my database and looks like the following:
HTML ABCDEFGHIJK
1RefNoSetSubsetStatus
2101lambsheepINP
3102catpetCOM
4103chickenbirdINP
5104milkcowINP
6105turkeybirdINP
7106honeybeeCAN
8107dogpetINP
9108boybabyINP
Sheet2 is for the user input, in which Columns H and I would have a data validation drop-down list and looks like the following: ...
View 14 Replies
View Related
Jan 4, 2014
I have three lists and I want to summarize them in one table. I can do this by formula or using Data validation by position. Who is the best way? There is a difference between them?
View 3 Replies
View Related
May 19, 2008
On sheet 1 I enter data such as:
Visit Date | Customer Name | Customer Number | Job Number | Product
On Sheet 2 i have a list of our 130 products which would be similar to '1130Tots Standard 24" ' I have made these as a list so we can choose from the list using data validation.
Now, out of the 130 products we have about 4 main different Catagories - Tots Direct, Tots RTS, Direct, RTS. - I could put what category they are in in a column next to the list on Sheet 2.
What i would like to happen is if e.g. a product is chosen from the drop down list, it could look in the cell in the column next to it and see what Catagory it is in and format the entire row on Sheet 1.
E.g. Direct changes colour to grey, Tots RTS to Pink, Tots Direct to Grey/Pink stripes, RTS stays standard no colour.
A bit of a development on a question i asked last week to cut out another stage. Currently people have to enter the product, then choose in the next column whether is is Direct, RTS, Tots Direct, Tots RTS then conditional formating will colour the rows. - Want to know if it is possible to do this all in 1 go by selecting the product from the list.
View 10 Replies
View Related
Jan 7, 2012
I have a need to use data validation for user selection of dependent lists, but dependent upon what the user picks from a previous list I need some selections to disappear or become hiden somhow.
For example, let's say I want to first pick from a list of Countries, then States, then Cities, but some of the Countries do not have States, just Cities and some have both. When a Country does not have any States I need the States data validation drop down box to disappear and the cell to become blank so that the user knows there is no selection needed.
I know how to make the dependent data validation lists, but I do not know how to make one of these drop down lists disappear based upon a previous selection in dependent lists.
View 4 Replies
View Related
Sep 28, 2007
I have on a sheet:
4 data validation lists that contain the exact same values.
would like to have:
One validation list box that is dependant on all 4 vd lists.
I posted a thread on dv and came to the conclusion that it is not possible to use INDIRECT() as it only allows for one cell reference and not four.
Is there another way to do this?
Glove Man, I tried your suggestion but couldn't get it work.
View 9 Replies
View Related
Sep 1, 2009
I'm trying to create a cell with multiple dropdown lists in E4 depending on a value from another drop down list in B4. Both E4 dropdown lists are named cell ranges RV_MECHANISM and VALVE_OPERATING_MECHANISM_TYPE. I know how to do this in Data Validation using an IF formula, however, that's not quite "bullet proof" or "idiot proof" enough.
I'm attempting to create a macro to load only the appropriate dropdown list in E4 as called for by B4.
I recorded the Data Validation dropdown lists using the macro recorder, then searched through all appropriate posts I could find at MrExcel and attempted to write the appropriate macro code as follows;
Sub RVorMECHTYPE()
With Selection.Validation
.Delete
.Add Type:=xlValidateList
If Range("$B$4").Value = "RV" Then
ValList.RV_MECHANISM
Else
ValList.VALVE_OPERATING_MECHANISM_TYPE
End With
Range("E4").Select
End If
End Sub
Compile error: End With without With
That's as close as I can get ... can one of you kind souls direct my macro coding paths and offer up the correct code for accomplishing this task.
View 9 Replies
View Related
Oct 7, 2006
I have a data validation list in B31 "material type" that has 4 options (Adhesives, Metals, Backer Board, & Grout). Based on that selection F31 needs to display a list of "descriptions" that match that "material type". The list is in book "database.xls!sheet3". Material type list is Column A, Description is in Column E. I know that you can't link to an unopened workbook in data validation, & I've been trying to code it, but again the lack of expierence & knowledge has frustrated me again :P This code to get the info for the file to open
Private Function GetValue(path, file, sheet, ref)
Dim arg As String
If Right(path, 1) <> "" Then path = path & ""
If Dir(path & file) = "" Then
GetValue = "File Not Found"
Exit Function
End If
arg = "'" & path & "[" & file & "]" & sheet & "'!" & _
Range(ref).Range("A1").Address(, , xlR1C1)
GetValue = ExecuteExcel4Macro(arg)
End Function....................
View 9 Replies
View Related
Nov 13, 2006
In the attached example I have a column of data on worksheet 2. Extra rows will frequently be added and removed from the column. I want to use that column of data to populate a validation drop down box for a whole column of cells on sheet 1. (Target cells coloured yellow for demonstration purposes)
I don’t want the validation drop down to be full of blank rows so I set up a dynamic named range to refer to the column on Sheet2. It all works really well...but...only for cell D6 on sheet 2. It doesn’t work on any of the other target cells on sheet 2 or on sheet 1. I have been looking at this for far too long and it has begun hurting my brain.
View 2 Replies
View Related