Data Validation VS Combobox
Mar 17, 2009
I am using Excel 2007 and I've been working with a spreadsheet that utilizes several Data Validation to allow users to make different choices and depending on those choices the next options in line change. My problem is that I have so many different options, so long of formulas, that I run out of space to type in formulas in the DV source field. One way I get around this is to drop down to the next cell and start again, but I really need all the choices to stay in one row. Somebody suggested using VLookup, but I am not sure if that is the right path to take because a few of the final drop down choices have multiple options, and I'm not clear on how to use VLookup.
I am strongly considering using a Combobox Form Control or Combobox ActiveX control because, from what I have learned, they wouldn't be restricted by formula space. However, being fairly new to Excel I do not know what the codes would be to allow the comboboxes to change options based on previous selections. I've searched the message boards extensively and haven't been able to find an answer.
View 9 Replies
ADVERTISEMENT
May 3, 2013
I am working on a project where I have a data validation list box in column A B and C on the same row. The selection in column A determines what can be selected in column B, and column b effects column c selection. The data from the list is located in another sheet and dynamic named ranges.
The data validation source is as follows:
Column A:
=ProjectNoList
Column B:
=OFFSET(ProjectNoList,MATCH(C11,UniProjectNo,0)-1,12,COUNTIF(UniProjectNo,C11),1)
Column C: =OFFSET(ProjectNoList,MATCH(D11,OFFSET(ProjectNoList,MATCH(C11,ProjectNo,0)-1,2,COUNTIF(ProjectNo,C11),1),0)-1+MATCH(C11,ProjectNo,0)-1,3,COUNTIFS(DisciplineCode,D11,ProjectNo,C11),1)
This works fine, however I need the drop down menus to be longer as there can sometimes be a lot of data to scroll through. To do this I have used the instructions at Excel Data Validation Combo box Click to make a combobox data validation.
It works fines for column A, however I can't get the list for column B to populate in the combo box.
The code looks like this:
Code:
Dim str As String
Dim cboTemp As OLEObject
Dim ws As Worksheet
Set ws = ActiveSheet
On Error GoTo errHandler
If Target.Count > 1 Then GoTo exitHandler
Set cboTemp = ws.OLEObjects("ComboName")
On Error Resume Next
If cboTemp.Visible = True Then
With cboTemp
.Top = 10
.Left = 10
.ListFillRange = ""
[code]....
I suspect that column A works because the data validation formula is only referring to a named ranged, ProjectNolist, however columbs B and C use a few in a formula.
Code:
.ListFillRange = str
is empty when column b is selected
is it possible to get the data validation list from column b and c into a combo box and if so how?
View 6 Replies
View Related
May 5, 2009
I'm still curious about the sample from Contextures, http://www.contextures.com/excelfiles.html (DV0032 - Dependent Data Validation Combobox)
I have made a modification from its file (sample is attached). First drop list can be autocomplete, but the second cannot. For the comparing, I made row 2 in ValidationSample sheet is my modification, and row 3 is the original.
View 10 Replies
View Related
Sep 19, 2013
I found a code on [URL] that claims that it will do what I want to achieve. I tried it but it is not working for me. Here is the code
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
Dim str As String
[Code]....
How to verify that this code is a working code and not just bogus one?
View 1 Replies
View Related
Jun 7, 2007
I'm using a script that when you double click on a cell containing Data Validation > List it changes to a combo box that has an autocomplete/increased columns view...It's working great, however there are two small modifications I would love to do and am not having much success with. Currently, you double click the cell w/the Data Validation > List in it, it then changes to a combo box and you can auto complete using the keyboard or select the dropdown and choose from an increased list. However, I would like to be able to simply single click on the cell, have it change to the combo box and auto expand the list if possible.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
Dim str As String
Dim cboTemp As OLEObject
Dim ws As Worksheet
Dim wsList As Worksheet
Set ws = ActiveSheet
Set wsList = Sheets("Rep Assist Report")
Cancel = True
Set cboTemp = ws.OLEObjects("RepName1")
On Error Resume Next
With cboTemp
.ListFillRange = ""
.LinkedCell = ""
.Visible = False
End With
On Error Goto errHandler
If Target.Validation.Type = 3 Then.....................
View 6 Replies
View Related
Apr 9, 2013
I am using excel 2010. I have 3 separate form control each with its own macro. I would like to create a combo box with a drop down with a list of each form control case and be able to perform the same function as the individual form control when a specific name is chosen in the list of the combo box.
View 3 Replies
View Related
Aug 19, 2009
I'm trying to figure a to enforce dual data validation on a single cell. That is, I need to restrict the user to entering only a decimal value, only if a particular other cell (say A2) is blank. To put it another way, if A2 is blank, the user can enter a decimal value, but if A2 is not blank, the user cannot enter anything. I can use Data Validation to enforce either the decimal restriction or the ISBLANK, but I'm not sure how to make them work together.
View 2 Replies
View Related
Oct 2, 2006
I have a Combobox with it's 'RowSource' set to two columns x 1500 rows on a spreadsheet. The Combobox is set to 'fmMatchEntryComplete'. When the user types in invalid text I get an "Invalid Value Property" error. I would like to validate the Combobox so that the user cannot type text other than available in the list, or not allow for the focus to be taken away away unless the item is a match to the list. At present due to the interaction of other controls on the userform, the only way to clear the error is by pressing the 'Escape key'. I have a button designed to reset the 'RowSource' of the Combobox but even after adding a 'MouseMove' event to this button with code
Application.SendKeys "{ESC}"
View 4 Replies
View Related
Sep 5, 2006
I have a userform with 15 Combo boxes & I would like to make sure all the enabled combo boxes (some may be disabled) have a value > 0 (Zero) before exiting the userform.
View 5 Replies
View Related
Mar 30, 2014
I need to populate two combo boxes from excel sheet, the data will be like below:
Column A Column B
A 1
A 2
A 3
A 4
A 5
B 100
B 101
B 102
So from the above data, one combo box should hold unique values A & B.
On selecting a value from the 1st combo box A or B, respective values should be populated in 2nd combo box.
So the data should be like below:
If A is selected in the 1st combo box, then 2nd combo box should only show the values 1,2,3,4 & 5.
If B is selected in the 1st combo box, then 2nd combo box should only show the values 100,101 & 102.
Friends I need it in a macro and one important point is, this is dynamic and it is not static and the data can be more.
View 1 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
Apr 3, 2009
I have attached a sheet that I am working on. I want cell G1 to be less than or equal to 165. That cell contains a formula. If the formula takes the number to over 165 the validation is allowing it.
View 2 Replies
View Related
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
Jun 30, 2014
I had some of values in Column A, B & C for ex: column A has brand name, column B has model name and Column C has sub_model name here i have a limited values i need to make it as drop down list but i had a problem with the below formula.
=IF($F$2=Sheet2!$H$2,al_v,IF($F$2=Sheet2!$H$3,am_v,IF($F$2=Sheet2!$H$4,au_v,IF($F$2=Sheet2!$H$5,be_v,
IF($F$2=Sheet2!$H$6,bmw_v,IF($F$2=Sheet2!$H$7,bg_v,IF($F$2=Sheet2!$H$8,cv_v,I
F($F$2=Sheet2!$H$9,ch_v,IF($F$2=Sheet2!$H$9,ch_v,"")))))))))
i need to add some more ifelse but the validation don't allows it.
View 2 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
Jan 9, 2014
Essentially, I would like a user to be able to select a PUB from the Data Validation drop down in row 2 of the PUB RATES sheet so that the corresponding information in the DATA sheet autofills.
Currently, this works only for the first column under each PUB when selected and this fills across all 4 columns (rather than the respective information for each column filling).
Also, the Data Validation dropdown includes blanks which I would like to exclude.
I have used a Range Name for the Data Validation of each PUB so that these can be drawn from a separate sheet as I don't want all the DATA content on the same sheet as the PUB RATES content.
View 4 Replies
View Related
May 28, 2014
I want to load the actual data exist in the rows by selection value from the data validation list.
E.g I have two worksheet in one excel file. One has a data activities of persons with their name like two columns i have in which one exist the name of person and second exist the activities which they perform.
On the second sheet, i made a data validation list of all the person names
Now my requirement is, when i select a person name from the list, load all the data from the 1st sheet to second sheet. Is this possible without VB code, because I want to share it on the Google sheet with my boss, where VB sheet is not supposed to work.
View 13 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
Jul 27, 2009
I have a excel sheet with values correcponsing few names. I have a list for a Data Validation drop down. How to get all the data row wise for the name selected in the drop down.
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
Nov 1, 2006
In column A I have a list of text. There are blank lines in between the cell that actually contain text. What I am trying to accomplish is create a validation list that will give me only the cells with text in them and ignore the blanks. For example in column A1:A7 I have the following text:
John
Mike
Tony
Jake
My validation list will return those names but will also give me the blanks in between the names.
Is there any way to ignore the blanks?
View 4 Replies
View Related
Oct 14, 2013
I am trying to add a row of data to a combobox list of values but it looks like it will only allow a column of data to be added. Is there a simple way to add a row as the source data or would i need to add each data point using a For Next loop?
View 5 Replies
View Related
Mar 30, 2009
Am trying to get dynamic population of 2nd combobox based on match from criteria in combobox 1.
if column a = bears and column b = colours of bears then
when I select bears in combobox one, combobox 2 would populate with colors of bear.
I am think of having a combobox 1 change event that evaluates each row in a specific range (does it match the criteria?) if so, then add 2nd cell (column b) of that row to the combobox 2.
I know it would probably involve match and offset, add item and loop, but I am not sure what the syntax is.
View 9 Replies
View Related
Dec 8, 2009
When I make a comboBox selection from the dropdown menu, the menu stays down until the last statement of the comboBox code is finished. How do I make the dropdown disappear immediately after the selection is made?
View 9 Replies
View Related
Feb 21, 2014
Basically I have a column filled with names (A) that the combobox is filled with, I then have a text based inputbox and a submit button. Right now the submit button transfers the data from the inputbox to the same row depending on the combobox choice and edits the existing text which is fine.
However I also want the data to be submitted to another sheet where the data is not edited but added.
Example: I choose James from combobox and writes 10 in the inputbox, the submit button will then edit the existing value on the "Data Edit" sheet on the row James and add the value to the row James on the "Data Add sheet".
This is the edit code, I basically just need some pointers as to how to add data to blank cells in corresponding rows according to combobox selection.
[Code] .....
Attached File : Combobox Row Add.xlsâ
View 4 Replies
View Related
Jan 26, 2009
able to populate a combobox from data elsewhere in the workbook as follows:
View 7 Replies
View Related
Sep 2, 2009
A B C
1Timber$200A-rating
2Metal$500C-rating
3plastic$100B-rating
A1:A3 was input into combo box list. If I select an option in combo box, how can I make B11 and B12 to update data accordingly? (ie, if Metal was selected, B11 should show $500 and B12 should show C-rating)
View 4 Replies
View Related
Jan 15, 2013
I have created a combobox1 and I have written a code to populate the box the problem is when I run the form and select the data from the dropdown list it gives me an error. I can see the data but just can't select it. I have a command button that I use to save the data I select and insert it into fields on my worksheet. All I just need the drop down box to let me select the data I chose below is my code.
Private Sub ComboBox1_Click()
ComboBox1.Value = .Range("A2:A14")
End Sub
View 2 Replies
View Related
Jan 2, 2009
I have a combobox in which I need data loaded from a column of an excel sheet.
As of now, I am using the below
Last = Sheet9.Cells(Rows.Count, 1).End(xlUp).Row
With ComboBox1
For Row = 2 To Last
.AddItem Sheet9.Cells(Row, 1)
Next Row
End With
Is there any other way to load data?
View 9 Replies
View Related
May 19, 2006
I'm trying to create a data entry form that uses comboboxes. I can populate the comboboxes with data from an excell sheet. There are 3 columns of data that are called to each combobox, and the list of data is the same in each combobox. When the chosen line is selected for each combobox I then want to pass all that data back to the excel sheet in the same column layout. I suspect this will need to be done with an array.
Basically, I want to have five tasks with timing details that are done from Monday to Friday - these are listed in excel. I want each of these tasks to appear in each combo box (two columns in the combobox) so that the user can decide which task will be done on which day. Then the tasks are passed back to excel as a timetable. If it were 1 column I could do it but the second column is causing me grief. I suspect this will need to be done with an array.
View 9 Replies
View Related