I am trying to work up a referral tracker for my wife's employer. I have Named Ranges on sheet 2, a running log on sheet 1. I also have a userform that is being populated from the ranges on sheet 2. I have the project mostly functional, except for a feature I would like to add in. I am interested in adding to the named range that is being accessed if the entry is not in list, via the combobox1 on the userform. Also, if possible, I would like the list to re-sort behind the scenes so the added entry is properly located in A-Z format for next time. After searching the web a bit, I found some code that might work with some tinkering, but currently I am having issues with it. Here is the bit I am trying to use.
I have been getting 424 Object Errors and a few others as I continue to mess with this. I am also attaching the project if someone may see a better way of getting the task accomplished. The overall scope of this is to log all referral sources so monthly and yearly reports could be made.
I have a user form that has a combobox, two textboxes, and a button on it. When the form is loaded, the combobox fills with data from a worksheet I created. THe worksheet has a column with the item names, and another column with the quanity of each item. The combobox is filled with the item names. SO far I have this done. My issue is that when the user selects an item from the combobox, and enters a quantity in to the first textbox, and then clicks the button, I want the quantity in the textbox to add to the quantity cell that the part number from the combobox references to. Then I want this new quantity to show in the cell and the second textbox.
I have a number of named ranges on seperate sheets. As I add more entries to each sheet, the named range is naturally increasing so I dont have a fixed cell refence Effectively what I would like to know is - is there coding that would allow me to copy one named range - and paste the values to the the row beneath the last entry in a second named range. Filtering these I can do - it is just the copying that has me stumped
'i use a combobox in a userform to show data from a hidden sheet its name is sheet5(sheet1). 'i defined the Range as ExpCat and put ==OFFSET(Sheet1!$M$3,0,0, COUNTA(Sheet1!$M3:$M9),1) 'and use this code to view the data, but the code shows the data of the activesheet.
Private Sub ComboBox1_Click() Me.ComboBox1 = ThisWorkbook.Worksheets(5).Range("ExpCat").Value 'Me.ComboBox1 = ThisWorkbook.Sheet5.Range("ExpCat").Value
The '-1' allows for a heading at the top of the column. This works fine when the list in col. L has more than one entry under the heading. But with only one entry I get 'Runtime error 381 - Could not set the List property, Invalid property array index' and the debug highlights on
MFI is the named ranged that is referencing a column of data. This works, but I want to be able to change the MFI to a different named ranged.
So what I am trying to do is using an ActiveX Combo box so I can reference the named ranges that I have set, for example MFI, so each time a user chooses MFI or another named range, it will output to a linked cell (A1). Then the linked cell will be referenced into this forumla.
I have a worksheet called "Lookup" with several dynamic named ranges (each is 1 column wide) including facility, department, shift, etc. On a summary worksheet in the same workbook I want users to use a dropdown or combo box (don't care what type) in cell B2 to select a facility and then based on their selection, copy the department named range data and paste it into the summary sheet beginning in cell A5 and paste the shift named range data into the summary sheet beginning in cell B5.
Example: user selects "AR Plant" from the dropdown or combo box and the data from the "AR_Rpt" named range is pasted into cell A5 and the "AR_Shift" named range is pasted into cell B5.
My Userform with combobox entries for product checks against the rowsource and if not on the list, is added to the list. the list is a named range in a Table that is used in a data model.
No matter which way I try I am regularly getting a corruption in the table that is home to the named range which is the rowsource... after one or two entries from the userform.
The rowsource is not bound to the worksheet, it is populated at userform_initialize procedure. (There are 4 combobox drawing from same rouwsource hence the loop through to check each)
debug points to the line at which conbobox value is being entered into the rowsource, though not always - it sometimes just crashes the whole file and everything needs restarting, upon which the table is fine and entry is evident.
I have tried resize, addrow to bottom of table variations and all result in the same core problem of a table corruption that crashes the file.
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.
i'm writing a refrigeration selection user interface, working from values on an excel spreadsheet. how to get the programme to automatically select a value from a list or range once a user has selected corresponding value from a list within a combobox. for example if a user sets the temperature of their refrigerator to -5 celsius i need the programme to automatically select the corresponding value of enthalpy for the air at that temperature.
I have the following VBA code which created a unique list of values in a data column. After list is created, I want to assign it to a named range ReferTo parameter. Currently I am getting compiler error. How can I assign this unique list to a named range?
VB: Dim UList As New Collection Dim rCell As Range .... If TypeName(Selection) = "Range" Then
I am trying to find a way to create a list of unique items from a named range. I have found a few solutions using filters for ranges that are contained in the one column but not named ranges that contain multiple rows and multiple columns.
Is there any way to copy all of the unique items from the named range to another location? Lets call the named range Table1 and it spans from B2 to J100.
I have been trying to make a combobox for which the list is a named range. However, this range needs to be transposed. ListFillRange doesn't seem to let me transpose the list first. I've tried transposing the list somewhere else first and then adding it, but it seems to want a range as opposed to a reference to a range. I'm so confused now. This is the basic code that I wish would work.
While I'm at it, could someone explain to be how to refer to a combobox. ie. when you create it, you don't name it so how can you refer to it. That's why I have used the selection tool above to add the list.
I have a worksheet where a number of the cells have been assigned names. I want to copy these cell names & create a list on another part of the worksheet. Does anyone have some code I could use to achieve this?
I'm creating a sheet that takes three Validation Lists into account. The first two lists are based on named regions. The third list uses the first two lists to narrow a search down so that the user can pick what they want from a smaller selection. I'm using the code from Contextures.com to allow the user to double click the validation list to pop up a Combo Box. This allows me to show more than 8 selections at a time and also gives a little freedom on font and font size.
Since the third list is not based on a named region but rather code to compare the two previous lists, when I double click the third validation list a blank combo box pops up. it possible to pop up what ever lists are in the validation boxes.
This is the code that I have in the third validation box which States "The Source Currently evaluates to an error" but works fine for some reason. =OFFSET(CategoryStart, MATCH(B4, CategoryColumn, 0) - 1, IF(A4 = "Description", 2, IF(A4 = "ExtDescription", 3, IF(A4 = "PartNumber",4))), COUNTIF(CategoryColumn,B4), 1)
I tried making a named region that was based on the code, so that the list could change as the user selected different options from the first two lists. This gave me the same problems as I had before.
i have a list of surnames in column A in a spreadsheet i want to use this for the source of the combo box also i want this list to be unique and if the surname is not present i want to be able to put the name in the combo box and add it to the sheet
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.
I have been trying to figure out how to use a named range (on another sheet) to validate the user entered data in a specific column. All my attempts at utilizing worksheet_change event have ended in errors. I've created a simple workbook that shows what I'm trying to do and have attached it to this message. The 'Sample (Data)' worksheet has the data table that would be completed by the user. On the 'Validation' worksheet I have named the range to be used to validate the data as 'rngVal'. So when something is entered under the 'Expense Type' heading, the code would verify that the value entered was contained in the 'myVal' validation list. If it was not present in the list, a msgbox would instruct you to try again. After stealing bits of knowledge and code from many of the posts on this site I cobbled together the following (which results in an error at the 'set rngFind' line):
Private Sub Worksheet_Change(ByVal Target As Range) Dim rngFind As Range 'Set Target = Cells(ActiveCell.Row, ActiveCell.Column) Set rngFind = Range("rngVal"). Find(Target.Value) 'If data in column C changes, do the following If Target.Column = 3 Then 'If the value is found on the validation list, do nothing. If rngFind Is Nothing Then Else MsgBox "You must enter one of the following in this cell:" With Application .EnableEvents = False .Undo .EnableEvents = True End With End If Else End If End Sub
I purchased the Excel Hacks book, and when attempting to do hack #53 with a drop down list, I can not get it to work. I do exactly what the book says to do, however, my chart and my drop down list are not linked together, and when I change a name in the drop down list, the information on the chart does not change.
I have a dynamic named range which allows me to have an automatically growing drop down list in B1 as more cities are added in column A. however, my workbook will have N/A errors to begin with before cities are added.
is there a way for my drop down list in B1 not to include the N/A errors and only the cities? of course when the next N/A error turns into a city, i would like the B1 drop down list to recognise this and include it.
I am building an interactive sheet to profile a number of divisions based on a summary sheet of about 1200 rows and 90 columns of profiling criteria
I have attached an example but essentially:
1. I would like to be able to select from a list a value which would also be a named range title 2. Have the range information transposed into a row
What works: 1. I can transpose the range information when I use the following formula I used OFFSET(Governance,COLUMN()-MIN(COLUMN(HGovernance)),0)
The problem: I cant get it to use a cell reference (i.e. When I select Governance out of a Drop down list of Finance, HR, Governance etc). Having to type in "Governance" to bring back governance range information is fine, but not great when I am trying to profile the Finance or HR division as it then becomes too manual.
Basically on a summary page, on sheet 1 say I have a formula which picks up the unit cost (I have this as an array across 5 years)
What I then want to do is multiply this by a volume driver. I have a list of these drivers on a seperate page, so for convenience lets say DRIVER_01,DRIVER_02 etc. These are also 5 years arrays.
So what I want to do it be able to select which driver I want to use for volume on the summary, from a drop down box I have set up, and then the formula pick up that named range, and not just recognise it as a text cell.
I need the ability to change the driver in the future, hence the drop down box. I can also get the unit array part to work fine, I'm just struggling to get this driver array to work..............