Create Range List Code For Data Validation
Sep 29, 2007
I am using following code to apply data validation list. However this code gives error Intermittently. The error message is 'Application defined or Object defined error'. Also this code looks little cumber some. Will really apprciate if any one can put some ligh on why is this error appearing sometimes. Do I need to change something in the code or add few extra lines. I feel following points will be necessary when you check my code
1. The data of validation list is stored under the column heading 'Reported_By_List'
2. Validation is applied on the range under the column heading 'Reported Through'
3. Start and last Cell Address Of the cells of the column in which data of validation list is
stored are extracted into the variables 'StartCellAddress1' & 'LastCellAddress1 '
4. Start and last Cell Address Of the cells of the column on which data validation will be
applied are stored are extracted into the variables 'StartCellAddress2' &
'LastCellAddres2'
Sub Validation1()
Dim wsName As String
Dim RValue As String
Dim WorkBookName As String
Dim StartRow As Integer
Dim StartColumn As Integer
Dim LastRow As Integer
Dim CellAddress As String
Dim ColumnAddress As String
Application. ScreenUpdating = False
WorkBookName = ThisWorkbook.Name
wsName = ActiveSheet.Name...........
View 3 Replies
ADVERTISEMENT
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
Sep 12, 2012
I am in the process of creating a database, and have used 'Data Validation' to create drop down lists in order to obtain information quickly from the database.
I have encountered an issue where if I have a list the resembles the one shown below, the drop down list will show spaces.
This is particularly an issue for myself and my database because there is over 1,000 items in the list, and there are countless empty cells within the list. I have tried sorting the list, BUT because the database is quite large, sorting it will disrupt other functions of the database.
Ideally, I would like the drop down list to show only entries within the list that are not empty so the drop down list is entirely relevant, and more user friendly.
View 2 Replies
View Related
Nov 15, 2011
I have a large set of data that I need to use for data validation in drop down lists. The data is arranged in 4 columns and entries within each column may repeat numerous times. The four columns are as this..
Category Subcategory 1 Subcategory2 Subcategory3
The first data validation will come from the first column. Once this is chosen the second drop down should populate with the subcategory that correspond to that category stored in column 2. once that is chosen the thrid data validation should populate with the corresponding subcategory from column three etc.. This is a small sample of the data in the columns.
View 5 Replies
View Related
Sep 26, 2013
I'd like to create a drop down list in data validation from a column of data that contains numerous duplicates.
For example, let's say column A contained hundreds of transactions with either North, South, East and West, how could I create a drop down list in another cell that only had four selection options?
View 5 Replies
View Related
Jul 28, 2014
I have three individual lists and I am using a formula like this for each of them =OFFSET(Table1,MATCH(F15,Table1,0)-1,1,COUNTIF(Table1,F15),1)
for my final cell I need to create another data validation list which is depenant on the values selected in the previous three lists.. how I would alter the formula to allow me to do that? I tried using and after the match to match all three tables but it never worked
View 12 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
Feb 5, 2009
I have a monthly report showing actuals and budget for current month (or quarter) and year to date. Range names have been created for (1) each month, (2) each quarter and (3) year to date). I'm using the SUMPRODUCT function to extract information by account. For example:
=SUMPRODUCT(($A9=ACT_Account)*(ACT_Jan))
This formula works except I have to replace the "ACT_Jan" each month accordingly. Can a data validation list be created with the range names so that updating this formula monthly can be simplified? For example, changing "ACT_Jan" to "ACT_Feb" with a drop down list.
View 9 Replies
View Related
Oct 30, 2012
I have been tasked with creating a data validation list. My data is contained on a separate sheet from my data validation list. I am using a named range to use the data for my data validation list. However, I am looking to add a criteria to my data validation list so that it only is populated with values based on another column on my data sheet.
For example, if I have a data sheet called "Employee" and I have two columns. Column A is a list of employee names and I have named a range in column A as "EmployeeName". Column B is used to define the category of employee. This value is a letter, for example, "A", "B", "C", or "D". This column does not have a named range as I don't know if I need one to get this to work.
I would like the data validation on one sheet to use a list of employees of a particular class from another sheet. Straight forward validation is easy using a validation list with a formula =EmployeeName. But how do I only list employees that have a category "A"? For some reason, I cannot get some of the formulas I have found while searching this message board to work.
View 7 Replies
View Related
Nov 23, 2007
I'd like to create a list via Data validation-list. Anyone knows how to reference a range on another sheet of the workbook?
The range is =$Q$5:$Q$13
Is it possible to reference another sheet? If yes, how is is done?
View 9 Replies
View Related
May 7, 2012
Can I create data validation list of the names created in the name box or of the sheet tab names?
View 5 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
Oct 17, 2013
I would like to know how to create a validation based on a list, but with filtered. I have an employee sheet and another sheet to select the names but only according to a specific job.
View 7 Replies
View Related
Jun 27, 2006
I want to add "Data Validation List" by VBA code.
If in column "A" I have 100 rows of data, I would like that in column be will be 100 "combos" with reference to certaing range.
View 9 Replies
View Related
May 8, 2014
I have a list generator that creates a set of data in a multi-column & row dataset. I would like a formula to create a list of the alpha data points only which excludes blanks and any errors.
Example:
AADD
#N/A
BB23EEFF
#N/A
#N/A12GG
CC
Results:
AA
BB
CC
DD
EE
FF
GG
View 7 Replies
View Related
Feb 22, 2012
Every two weeks: During Payroll, we have a list of managers and specific employees under that manager.
The managers name is in Column A and they repeat.
Normally we filter that manager, copy and paste the data into a new Workbook, save it, and send the info out to that manager. We do not want other managers to see the information provided to the specific manager.
This is a long tedious process as there are close to 30 managers.
1. Is there a way to run a macro (presumably based on a validation list) to filter, copy the worksheet into a new workbook for each of the 30+ managers?
2. Is there a way to save each with a specific name like "Payroll Feb11 - Manager Name.xlsx"
View 9 Replies
View Related
Jun 16, 2009
Any way in ms excel to create unlimited unique validation list. i am working on a small data where one colums data(Validation list) changes on the selection of previous column data filed. i am using indirect function with defined name range. but ms-excel is not accepting new names now and still i have 75 datagrops left to define and validate.
is there any formula or vba code to fix this problem.
View 9 Replies
View Related
Dec 15, 2007
I am attempting to use a named range as my Validation data source but have two questions:
1) It seems when you use a named range as a source the user can enter in any data they want in that cell. I really only want the user restricted to the list I give them. If I enter the list manually in the source box then it works but I really want to use a named range
2) My range is fixed to 10 cells and the user can enter in as many variables as they want (up to ten). When a user clicks on one of the cells that the validation is set to read the range the user has to always scroll to get to the top. When selecting the cell Ecel always defaults to the bottom choice in the list. I want to minimize the VBA because Mac users will be using this and VBA seems to be touchy with macs.
View 9 Replies
View Related
May 8, 2009
very complex spreadsheet for weight & balance calculations. It's to the point where everything works perfectly in Excel 2007, but it must be used primarily with Excel 2003. Discovered that a crashing problem had to do with condtional formatting, that's all been cleared and will soon be fixed, but there's one that I just can't quite figure out.
I'm using the worksheet change event to trigger the update of charts... In this case, it's looking at a particular cell that has data validation on a dropdown as the trigger. Works perfectly in 2007, and if I put a msgbox prompt in to be launched by a change of that cell, it launches. I can put the chart update code in a separate sub and launch it manually every time, but I cannot call it from the worksheet change.
I've included attachments showing what I believe are the relevant bits of code -
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
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
Oct 28, 2011
I'm looking for a way to get a unique list from a column to a data validation drop down list. Any fancy formula or vba script to create a UDF which. Does this?
View 5 Replies
View Related
Apr 29, 2012
I have a List of Different Fruits in Cells A1 to A5
Apple
Banana
Orange
Strawberry
Cherry
And I use data validation list in 5 different cells from Cells C1 to C5 then in every cell the list will show all the fruits,
But I want that if I select Any Fruit in cell C1 that should not be included in the remaining 4 cells, and the fruits selected in Cells C1 and Cell C2 should not be included in the remaining 3 cells and so on....
I Used the formula
=IF(C1=A1,OFFSET(A2,,,COUNTA($A$2:$A$5),1),0)
But this works fine if I select Apple in the Cell C1, then the List of C2 Shows all Fruits other than Apple, But if in Cell C1 I select any fruit other than Apple it does not work... (Using Excel2007 & Win XP)
View 4 Replies
View Related
Apr 9, 2009
We've got a dropdown box (data validation - list) which is picking up data from a specific column. The data in the column is in the following format:
1 Sales
2 Contracts
18 Opening Stock
27 Purchase
etc
When we select an entry from the dropdown box the cell obviously displays both the number and the text description to the right. What we need it to do is just display the number after selecting an item from the list. The text is descriptive and to make it easier for users. Is there a way of configuring the dropdown box (or another way) so that say if a user selects "1 Sales" from the dropdown it just displays "1" in the cell.
View 4 Replies
View Related
Apr 19, 2012
I am trying to create a data validation using Height as the subject.
I have column A with Height, the user inputs the heights, based on the input, i want column B to present with values as below
If Height < 24
Options: Good, Bad, Ok
If Height between 24 and 50
Options: Good, Bad, Average
If Height > 50
Options: Good, Bad, Excellent
View 9 Replies
View Related
May 12, 2004
dear....can i set width in list box data validation (width in cell i set short).thanks
View 9 Replies
View Related
Oct 18, 2006
is there a way to force so that a cell value can be only of what a validation droplist offers, hence users can not enter their own values and have to use the droplist for cell content selection.
View 2 Replies
View Related
Jun 22, 2009
I'm trying to fill a list with some hard values. When I use the macro recorder it adds formula="choice 1;choice 2; etc", these are all separate values in the list. However if I use this within a macro I only have one option with all three values combined.
View 4 Replies
View Related
Nov 12, 2013
I want to add some Data Validation for a cell and want it to validate that the entered data is in the format (DD/MM/YYYY HH:MM)
I guess I need to use a custom validation formula, however cant figure it out
View 1 Replies
View Related
Mar 12, 2009
I have a Range on one sheet formatted like this and sorted by Sup then Rep:
Rep Sup
John Sally
Mark Sally
Joseph Sally
George Betty
James Betty
etc..
I have a Validation Drop Down list where a Supervisor is chosen. There's a specific range that I would like to automatically fill in with the reps assigned to the Sup. This is driving me crazy! I already know how to obtain that list as another Validation Drop Down, but not quite sure how to make those values appear in a range instead of a Validation List.
View 2 Replies
View Related