Combo Box Values Based On Another ComboBox
Jan 4, 2007
I have a worksheet in which i have a set of data similar to the following (i have used colons as delimiters in this example).........
Basically what i want is 2 combo boxes. The first combo bow will allow you to select the phone type (e.g. Motorola PEBL, Motorola RAZR etc etc). The second combo box will have a list of items which match up to the value selected in the first combo box. Once the item has been selected from the 2nd combo box then the relevant matching data will be shown in a group of cells on the worksheet on which the combo boxes reside.
I know that this could be done by using the data validation feature if my data were laid out in a different way however it is not possible for me to re-lay out all the data in my worksheet. I have been told that there my problem copuld be potentially solved by using Excel VB but unfortanately my VB skills are quite weak.
View 2 Replies
ADVERTISEMENT
Nov 4, 2008
I have an activeX combo-box that selects from different pieces of equipment that we supply. Based on that selection, I require ranges from the same page that the combo-box is on to either hide or unhide. Also, I require different tabs to become visible or hidden based on that same selection. So far so good - I have code that does this, and it appears to work without glitch.
Where the problem arises, is in one of the ranges that is unhidden when a particular piece of equipment is selected there is another combo-box that I would like to use (the number of said pieces of equipment to supply) to further hide/unhide additional ranges on the same page, and also hide/unhide certain tabs as well.
When I make a selection from combo-box 1, all works as planned, but when I change the state of combo-box 2, even with no associated coding referring to it, I cannot change combo-box 1 again without getting Error 1004 "Unable to get the Hidden property of the range class".
None of the sheets in the workbook are protected.
I would sincerely appreciate any help/code that could circumvent this error.
View 9 Replies
View Related
Oct 9, 2008
The first combo box is on a userform so that a subject can be selected
View 3 Replies
View Related
May 2, 2006
I've got a database and want to put the names that are in one culumn of the Worksheet into a combobox.
I use a Loop and the addItem procedure.
The thing is that there are many names that are the same, just diferent records for the same company...
How do i do that every name only appears once in the ComboBox.
View 3 Replies
View Related
Jul 20, 2014
how can I build a userform to display all values from a row? in order to select a row, i was thinking to use a combobox to display values from one column and based on that selection, display all values in that row? the reason i want to use a userform is because i would also like to be able to edit that data.
View 3 Replies
View Related
Nov 16, 2011
I have a vba to hide certain rows based on 4 values (either 15, 20, 25, 30) are the choices in the 'ComboBox' drop down list. I also have the rows grouped so i need to make sure to collapse those back each time. Here is the vba i'm using, but its not quite right for some reason.
PHP Code:
Private Sub ComboBox1_Change()       Â
If Range("J8").Value = "15" Then           Â
Range("A185:A244").EntireRow.Hidden = True           Â
Range("A245:A304").EntireRow.Hidden = True           Â
Range("A305:A364").EntireRow.Hidden = True           Â
Range("A365").EntireRow.Hidden = False           Â
[Code]...
View 1 Replies
View Related
Apr 24, 2014
I am trying to create a macro that will allow the user to select choices from combo boxes on a userform. The choice of one combo box determines what will be shown in the next combo box and so on. This will occur a set number of times (depending on what they are looking for), at which point the list of possible choices will be presented.
I populated one combo box in UserForm_Initialize() but then I might have to change the others with Combobox1_Change()...
View 4 Replies
View Related
Jun 28, 2014
I have created a spreadsheet that is a roster to track mutliple crews and shifts.
I have a userform which is used to select a person on shift and assign them as being on either, Annual Leave, Personal Leave, Training.... on particular days.
I would like to have the shift combobox auto populate what shift the person is on based on the person and dates entered. All the information is there I just can't get the code to do this.
I was also thinking about blocks where the shift goes from DS to NS and if people are on leave over this time. I would need the combobox to know this also.
I have attached my workbook : New Annual Leave Spreadsheet.xlsm
View 9 Replies
View Related
Feb 15, 2007
i need to be able to fill a combo box on a userform with the data on sheet1 and when you select the item from the combobox it will populate the textbox below.
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
Jun 20, 2009
try and achive is when a user selects a item from the 1st Combobox the 2nd Combobox is the populated with the cell that is to the right of the selected item.
for Example if a user selects AAB from combobox1,, Combobox2 should populate with Belly.
Maby using combobox1_Exit for the excercise.
View 14 Replies
View Related
Jun 12, 2006
I have a table, headers "FirstName" and "SurName".
Further a Userform with 2 Comboboxes "FirstName" and "SurName"
I'd like to choose the FirstName (say Jack) in the "FirstName" combobox, and based on that get the choice of the Surnames of all my Jacks in the "SurName" combobox.
Actually my sheet has much more fields and comboboxes, but i think my problem is just that I do not find a way to populate them dynamically.
View 9 Replies
View Related
Feb 8, 2008
How can i Loop through a combobox's values and compare to a string value and then set the listindex of the combobox to that value?
View 5 Replies
View Related
Apr 8, 2007
is it possible to perform calculation such as sum,multiply value of 2 combobox and get it shown at 3rd combobox/label at userform initialize stage?
View 9 Replies
View Related
Apr 9, 2012
I'm trying to make a userform that has 2 combo boxes. I have just 3 columns right now.
Procedure GrpADA-QSI DescProcedure GrpAnesthesia And
Drugs9210-LOCAL ANESTH/NO SURGAnesthesia And DrugsAnesthesia And
Drugs9212-TRIGEM BLOCK ANESTHCrowns And BridgeAnesthesia And
Drugs9215-LOCAL ANESTHESIADenturesAnesthesia And
[Code] ........
I copied and pasted Column A into Column C and then removed duplicates. I named Column C 'ValList' and placed it in the RowSource for ComboBox1. What I now want is for ComboBox2 to populate based on my selection in ComboBox1. There are no duplicates in Column B. Duplicates are in Column A.
I also named Column A 'Proc_Grp' and Column B 'ADA_QSI_Desc'
For the properties in Combobox2, I left the RowSource empty. (that's correct right?) Because there's going to be a code that links Combobox2 to Combobox1... I think...
View 6 Replies
View Related
Apr 21, 2006
I have a combo box on a form that is linked to a column of values allowing pre-emptive typing, or selection via a drop down. This works perfectly with one exception - each item shows up multiple times.
Is there any way of getting around this? the only way I can think of offhand would be to link it to a seperate table which is populated on a semi regular basis via another VB process? I would have thought this would have been a fairly common question but haven't been able to find anything on this board or others as yet.
View 3 Replies
View Related
Dec 21, 2006
I have a column with company names, with repeats, and I am trying to filter out the repeat entries and fill a combo box with these entries. I also want the box to update every time I add a new company to the list that isn't a repeat of one already on the list.
View 14 Replies
View Related
Dec 26, 2007
I have created a combo box and have inputted the values
Jan, Feb, Mar (think you get the idea).... Dec
I am looking to assign a macro to each value so that each one shows a graph, i have already created the macro’s to show the graphs. Just unsure how to make them work with the combo box
View 9 Replies
View Related
Oct 31, 2009
I have a combo box, from the control toolbar, that I have populated with a named range in the properties of the combo box. The items in the named range vary when an earlier combo box is selected. There are always at least 2 values populated in the named range, but can be as many as 22 values. What happens is when there are only 2 items in that range, the drop down list from the combo box shows 20 blank lines! I have been searching for how to "ignore empty cells" in this range, but cannot find it. The empty cells are always before and/or after the populated cells, if that helps. The range is updated via VBA, not formulas, if that is helpful as well.
View 9 Replies
View Related
Feb 1, 2007
I would like to create a combo box however the contents of the combo box depends on what i have selected in a previous combo box.
View 2 Replies
View Related
Mar 11, 2009
I want to use vlookup and pull the data from table1. But when the user selects Grand Total from the drop down, I want the data to be pulled from Table2. Please see attached for more clarification.
View 3 Replies
View Related
Jun 17, 2005
The form consists of 3 or 4 combo boxes and a few text boxes.
There are two worksheets "Data" and "ComboInfo".
Worksheet "ComboInfo" has 4 columns to represent the drop-down data.
I want the user to select a value in combo1. This will then repopulate and filter the list in combo2 with rows that matching combo1. I want to repeat the process for the other combo boxes.
Once the combo boxes are completed and a few additional textboxes the data needs to applied to the "Data" worksheet.
My main stumbling block is Filtering the Combo2.AddItem.
View 9 Replies
View Related
Mar 10, 2007
I created a series of combo boxes to accept values from the user. These values are intended to be used to build the name of a file they want to see. I tried to set whatever gets selected in each of the combo boxes equal to a distinct variable and inserted each variable into the file path at the appropriate point. I then created a variable for the file path and inserted the file path variable into code that opens that file, copies a particular worksheet, and pastes it into a new sheet in the “master” (the one with the form) workbook and labels it according to what it was named before.
The problem I’m having is that Excel says it doesn’t recognize the file path I’ve given it. Judging from the file path it quotes in the message, it’s not seeing my variables (only the part of the file path I entered in quotes) and then, later when I “debug” it says the variables are not defined. I’m wondering if there is more to defining a variable than what I’ve done. On the form page of code, I declared the following variables: The UserForm Code
Option Explicit
Public strPerformBySubtask As String
Public strPerformBySubelement As String
Public strPeriod As String
Public strMonth As String
I populated each combo box ok and remembered to call the sub procedures below, show the form, hide the form, et al. I think the problem might be in the sub procedures below that I thought would define the variables by setting the respective combo box output equal to a distinct variable I could use in the file path:...........................
View 2 Replies
View Related
Jun 5, 2014
I have set of user-form contains with Combox & 2 textbox and to generate report one cmd button
I have 3 different sheet contains report of daily activities ( Dispatch,Closed,Cancel)
If Dispatchcalls Select In Combobox1 ,Then Filter Start And End Date In Two Textboxes Then Click Cmd" Export Data To Excel"Extract Data from dispatchcalls Then Save Data Into Excel File As "Dispatchcalls".
If Closedcalls Select In Combobox1 Then Filter Start And End Date In Two Textboxes Then Click Cmd" Export Data To Excel"Extract Data from Closedcalls Save Data Into Excel File As "Closedcalls".
If Cancelcalls Select In Combobox1 Then Filter Start And End Date In Two Textboxes Then Click Cmd" Export Data To Excel"Extract Data from Cancelcalls Save Data Into Excel File As "Cancelcalls".
"C:UsersmaniDesktopNew folderLenvo_ReportsONSITE CasesVlokupuf" This is path i stored existing 3 file dispath,closed,cancel
View 3 Replies
View Related
Sep 19, 2009
I want to make a combo box in excel that, if i select it the sheet inside the combo box will appear.
Example:
Inside of combox are: Sheet1
Sheet2
Sheet3
If i click combo box and i choose sheet3 the sheet3 will appear.
How can i do this? theirs a macro code to use?
View 9 Replies
View Related
Oct 13, 2008
I have a list of insurance companies as column headers (B1:U1) and a list of what types of insurance they sell as row headers (A2:A6). Within the table, there is a "O" if they sell that type of insurance, and blank if they do not sell the insurance.
My first combo box is the list of insurance companies. I want my second combo box to be populated with only the types of insurance that particular company sells.
View 9 Replies
View Related
Apr 9, 2007
I have 4 combo boxes that allow me to make selection from pivot tables. As you know in the pivot table there's the "All Selection" which does not exist in combo boxes (I think), so I created a macro to reset all the pivot tables with the "All" option selected in all of them. However the values in the combo boxes are not changing.
View 14 Replies
View Related
Aug 8, 2013
i have a list of 5 teams in a named range ("teams") within a worksheet.
On a userform I have 5 combo boxes.
What I would like to have is an easy way to remove a used name in the list for the next combo box.
i.e. someone selects team a in combobox1, combobox2 then has a list of team b,c,d and e. I'll be locking the combo boxes and writing code so the next one will unlock if the previous box is populated.
i also need this to work if someone puts team c in first combobox this then gets removed in combobox2 then in combobox2 they input team e then both these values are removed for combobox3.
only way I can think of doing it is creating a lot of named ranges and using a lot of if then code which I'd like to avoid.
View 2 Replies
View Related
Apr 24, 2007
Using two Combo Boxes, I am trying to create an drop down outline form input sheet.
What it does is if you select the first selection in the combo box 1, then it hides certain rows, and deletes certain cells. If you select the second option in the combo box 1, it shows another combo box (2) which has another list of categories.
When I select the option 2 on the combo box 1, it unhides a bunch of rows, and activates combo box 2. However, when I try to select categories on combo box 2, each time it tries to hide/unhide rows I get this message "Unable to set the hidden property of the range class." I have no idea whats going on.
Here is my ....
View 9 Replies
View Related
Apr 3, 2009
I've built the code for a Template form for data entry of a survey. Through Control Toolbox I've created the form and used several textboxes, option buttons, checkboxes and COMBO boxes this one in turn being my trouble.
- Sheet one is called "Data" (this is the place where all inserted information is going to be stored
- Sheet two: "Variables" (here is where I keep the required values for the como boxes - inserted manually apriorely...
Question: What is the code to assing to the combo boxes in order to have the values from the sheet "Variables" of the range A1:A4 - use the comboboxq2 for referee, I'll do the others
P.S. see the code up to now:
Private Sub CommandButtonN_Click()
Dim eRow As Long
Dim ws As Worksheet
Dim inf As WorksheetFunction
Set ws = Worksheets("Data")
Set ws = Worksheets("Variables")
' Find first empty row in database survey
eRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row ................
View 9 Replies
View Related