Run Individual Macros Based On Validation List Selection
May 7, 2008
I have been searching through the site trying to find a solution to my issue, but I just can't seen to fixt it. Here is the scenario. I am working on a spreadsheet that will read some data, use that data to update the main chart and fill in the information in a table next to that chart. I recoreded 22 macros, total. Each macro corresponds to the especific type of chart that I need/want.
I want to be able to click on a drop down menu above the chart which will have each of the 22 options. Once the user clicks on the desired option, the specific macro will run and do that it should do. When I run the individual macro (without the VB that I wrote and will mention below), the system does what it should do. Everything looks dandy. But then I added this VB code to the sheet where the chart is:
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Range("A12").Value
Case "1"
Call a
Case "2"
Call b
Case "3"
Call cc
Case "4"
Call d
Case "5"
Call e................
View 2 Replies
ADVERTISEMENT
Dec 13, 2009
I'm using Excel 2007. I would like to seek some advise on how i may update cells after selecting a month from a drop down list.
i have created a simplified version of what i intend to have. One the 1st tab 'Cash Budget 2009', i have filled up a table with numbers, sorted by months. On the 2nd tab 'Dec09', i would like to create an expense table, to be able to be selected by month. So i have created a drop down list based on the months that are created in the 1st tab.
Upon selection of the month from the drop down list, i would like the cells to display (fetch) the data from the 1st worksheet. It would also be helpful if the name of the 2nd tab can be updated to read as the month that is being selected.
View 4 Replies
View Related
Dec 26, 2012
I've created seven names in my data validation source list on Sheet 3 in the following range of cells, A2-A7. My data drop down validation list is located on Sheet 1, A2 in the same workbook. I would like to trigger a macro based on the name I select in this drop validation drop down list that will fill out an address, telephone number, and email address in the following cells next to my data validation drop down list on Sheet 1: B2, B3, and B4. I want it to be designed so that users will select a name and have that person's corresponding address, telephone number, and email address fill right next to their name on the same sheet.
View 6 Replies
View Related
Jan 13, 2009
I am trying to create a fairly simple spreadsheet with about 8 columns and about 400 rows. One of the columns features a drop-down list with about 8 or 9 different options. Dependant on which option is selected, i would like the entire row to change colour with that option.
For example:
FAILED - whole row changes red
SUCCESSFUL - row has no fill
Tested - row changes to orange
etc.
Is this possible within Excel 2003?
View 9 Replies
View Related
May 18, 2007
Newbie user of VB. I need some assistance on a project. I have a form that uses a validation list ( cell c5) to populate other cells (c6, c7, c8, h5) using Vlookup.
This part works fine. On the list is an "other" choice which I need to initiate a textbox macros which would accept user input and populate the same cells with the entered data once a cmd button is selected. I’ve tried redefining my variables as ranges or strings with the same inconclusive results. The code as it stands looks like this:
Private Sub Worksheet_change(ByVal Target As Range)
Dim Vname As String
If Intersect(Target, Range("c5")) Is Nothing Then
'do nothing
Vname = Target.Value
If Vname = "" Then
'do nothing
If Vname = "Other" Then Newvendin.Show
End If
End If
End Sub
Using this code doesn’t initiate the event.
Newvendin is the userform to enter new data only if “other” is selected. CmdEnter is the enter button on the userform with textboxes in it. I’m having a bit of trouble with it’s code as well.
Private Sub cmdEnter_Click()
Dim ws As Worksheet
Set ws = Worksheets("OSP Parts List")
ws.Cells("c5").Value = Me.Vname.Value
ws.Cells("c6").Value = Me.Vadd1.Value
ws.Cells("c7").Value = Me.Vadd2.Value
ws.Cells("c8").Value = Me.Vcont.Value
ws.Cells("h5").Value = Me.Vphone.Value
End Sub
The Vxxxxx are the textboxes.
I get type mismatch errors using this code.
I would like it to populate the value typed into the textboxes into the indicated cells.
Final question and it’s probably stupid. If you have more than one Private Sub Worksheet_change(ByVal Target As Range) sub on your worksheet, how do you change the wording on each so that it won’t cause an Ambiguous name detected error?
View 5 Replies
View Related
Jan 3, 2009
A list in A2 of Sheet 1 of workbook has values "Select", "Yes", "No". How can I get the functionality using VBA so that until a certain rule is met (say A1 becomes 1) selection of items in the list is disabled? (Or any selection of items in the list returns a value of select only?
View 4 Replies
View Related
Mar 10, 2009
I have a spreadsheet with 2 combo boxes - Combobox 1 enables a user to specify if they want to look at the data on the sheet by week or month - it has just 2 options - "select by week" or "select by month"
The list in combobox 2 changes based on the selection in combobox1 - so if you select "select by week" , a date list by week shows up.
Combobox 2 is supposed to run a macro which updates some backend pivot tables. there are 2 types of backend pivottable - weekly tables and monthly tables.
What i am not sure about is how to get the selections in combobox 2 to run either the weekly macro or the monthly macro based on if combobox1 is set to week or month ...?
View 9 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
Apr 7, 2014
My current project involves sorting a spreadsheet, selecting specific qualifying data from the sheet, storing it into a variable, the pasting the individual values from the list into individual cells on a different sheet within the same workbook. Here is the code I have so far...
Code:
Sub Test()
'' freeze screen updating to remain on main worksheet
Application.ScreenUpdating = False
'' move to Avaliable worksheet
[Code] ..
When this code runs the first item in the list pastes into Sheet10 A1, but no other values from the list are placed into Sheet10. Previous to this I had been using a variation of this code to push the list into a combobox list within a userform. In that case instead of
Code:
ThisWorkbook.Worksheets("Sheet10").Range("A1") = x
I had
Code:
Combobox1.list = x
And this worked perfectly; creating a list within the combobox (in fact I can use this modification to interrogate my code to determine if the list is being properly generated, and it is).
View 2 Replies
View Related
Apr 13, 2012
I am trying to find something that would allow me to have a spreadsheet clear the contents of a certain cell based on the selection made from a data validation list which resides on the same row. This can best be described with an example.
The user selects anything but " " or "none" from the validation list, which for this example resides in C5, would trigger code to clear the contents, if any, in AA5. If " " or "none" is chosen the value remains.
This capability should be available for each row through 100.
View 3 Replies
View Related
Jun 24, 2009
I am trying to create a drop down list that when selected will display data in the 10 rows below and 4 columns, so a total of 40 cells. I would like the data to be based on the selection in the drop down list.
The data looks like this,
RequirementsQtyResourcesQty
Level 1 Sentinel10Level 1 Sentinel105
Level 2 Sentinel10Level 2 Sentinel167
Level 3 Sentinel10Level 3 Sentinel156
Level 1 Banga20Level 1 Banga401
Level 2 Banga20Level 2 Banga307
Level 4 Banga20Level 4 Banga0
i have 27 different combinations of the above list with up to 10 different rows. I have a label for each one, but i cannot get the rows below my drop down list to display the proper values base don the selection in the drop down list.
View 8 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 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
May 5, 2014
I want to send emails to about 12 - 14 people with various different excel spreadsheets using macros. This is after I have finished running a macro that splits a report into various departments and needs to be emailed to the heads of each department. I want to be able to attach each ecel report to its owner and have the macro email it for me once the reports have been generated.
View 3 Replies
View Related
Dec 18, 2008
I am working on a spreadsheet that is essentially a question and answer based document .... I need to set up the macros so that if a certain response is chosen from a list, it will automatically update the cell / row next to it with a pre-determined response ....
The way the spreadsheet is set up is that the first column has the question, the second column has the answer (yes, no or N/A - from data validation - as a list) and the third column is blank - but is titled "comment/action" .....
For example: if the question is "have you locked the car" and the answer column selects "NO" then I want the "comments/action" to come back with "you need to lock the car", and if the answer is "YES" then I want the comment/actions column to remain blank ...... The same with N/A ......
I will have around 100 questions in the document ...... I know I need to set up the responses on a separate worksheet - i just dont know what the macro's are to identify and place the appropriate response from the worksheet to the relevant comment/action column .....
View 10 Replies
View Related
Jan 15, 2012
I have to filter a data based upon the selection list value.
Ex:
Assume that i have 4 values listed in my SELECTION LIST
INDIA
US
UK
AUS
If i select "US" in selection list ...Filter has to take this dynamically and filter the data..
View 2 Replies
View Related
Oct 23, 2007
I have 2 Fields (Columns) and I have implemented Validation Lists in both these 2 columns.
I have around 10 values in Column A which are available in the List and have around 50 values in Column B in the List.
In other words, one of the five values or items can be selected for a single and unique value in Column A.
is it possible to call one of these 5 values in Column B depending upon the selection of the value in Column A ? Both the columns have validation lists.
View 9 Replies
View Related
Dec 4, 2007
how to get a 2nd drop down box to update the range (Not just use C6:C7)based on selection in 1st drop down box.
Example:
If Fat, Use range from C6:C7
If Skinny, Use range from D6:D7
Note: I tried putting an if statement in the input range for box2 but won't accept it.
View 9 Replies
View Related
Jun 8, 2007
I have created a pricing sensitivity for a list of products. In cell C3, users can select a product (i.e. Apple, Elmo, or Bowl) and based on this selection, a range of Prices and Units are then updated and the Revenue for each price point calculated. A few lines beneath this, I have a little summary table that lists all the products. I'd like for users to be able to enter in the optimal price point for each item and then have the Units and Revenue for that selected price point for that specific product automatically update.
For example, if I select Apple from my drop down list my price choices are $5, $10, $15; units are 100, 85, 70; and revenue are $500, $850, and $1,050 respectively. On the summary table, I would like units 85, revenue $850 to update automatically if I select/input a $10 price. This would happen for all the products so at the end I want to be able to calculate a blended revenue mix given my pricing changes.
View 9 Replies
View Related
Aug 17, 2009
I have a drop down validation list on sheet A that refers to my list on sheet B. I would like to formulate a cell on sheet C to give a value from a cell on sheet D based on which item is chosen from the validation list.
View 4 Replies
View Related
Nov 12, 2008
I have a validation list list in column E "Check, Charge, Credit Card, Other". in another column i have what i thought was a straight forward IF statement: =if(E3="Check",9999,"[ ]")
It does not recognize "Check" as the condition. Is there a tweak i can do to get it recognize the data validation.
View 2 Replies
View Related
Dec 27, 2009
I'm trying to create an excel template to log tickets , which should allow me to categorize the tickets in two to three levels. For ex : In the spreadsheet attached , in I4 I have done the first categorization as Fruits , now J4 should populate the list based on I4 selection. I have attached a sample spreadsheet for better explanation.
View 2 Replies
View Related
Nov 21, 2012
I am new to VB macros, I am trying to figure out how to color a tab Green based on a selection from a drop down list.
View 9 Replies
View Related
Apr 24, 2009
I have a list similar to the below:
#....|Name.... | Weighting %
1Artur Boruc 1
2Igor Tudor 5
3Alessandro Grandoni 3
4Gian Elia Amoretti 3
5Olivier Kapo 12
6Kim Källström 13
7Emiliano Bigica 13
8Julio Baldivieso 12
9Fabrizio Miccoli 13
10Peter Vougt 14
11Massimiliano Esposito 12
What I want to do is randomly select either number 1 to 11 (leftmost column OR the person it represents) but also make the selection based on the percentages in the rightmost column. To illustrate using the above example, Number 11 (Massimiliano Esposito) should have 12 times more chance of being randomly selected than Number 1 (Artur Boruc)...
I have used a formula such as
PHP
=INDEX(A$1:A$11,INT((RAND()*11)+1),1)
to randomly select a cell but how would I modify this to include cell weightings? Or is there a better formula?
An additional note I have is that the weighting for each person will always be changing, but will always be a percentage.
View 11 Replies
View Related
Jul 2, 2014
I need VBA code to do the following:
When cell H2 = "Weekly", I need cell I2 to return "50".
When cell H2 = "Bi-weekly", I need cell I2 to return "25".
The value in Column I should change as soon as the value in Column H changes.
NOTE: The value in Column H is chosen from a Data Validation List.
I'm assuming offset is the best option?
View 7 Replies
View Related
Jun 14, 2014
I need to make a dropdown list (I know how to do that) and based on that selection, I need some cells below to automatically complete. How can I do that? Is it possible with or without VBA?
View 5 Replies
View Related
Apr 25, 2014
I'm trying to have a Data Validation list issue where I want to populate a second list based upon the value of the first list.
In this instance I have a Department in the drop down and Employee Name in the second drop down and I want people to only see Employee names if they're allocated to a particular Department. I've been able to do the list using the INDIRECT function, however that only works when there's only a small sample of both names & depts, however I'm looking at populating this document with around 3000 people and over 250 departments, so I would like to be able to use Column J on the Source Tab to populate the details on the Manager Entry tab.
I have attached a sample spreadsheet if I've not explained very clearly.
TIMESHEET sample.xlsx
View 9 Replies
View Related
Jul 4, 2014
I seek to create a date validation list based on information is another cell (see images)
Based on (data validated list) Cell B4 - have a validation list drawn from another tab on the same worksheet "Sub regions"
equally the same with sub regions and citys...
View 6 Replies
View Related
Apr 18, 2009
I want to populate a Data Validation based on values in another cell on another worksheet--but, I want to populate it with the values stored in the cell right next to the cell. http://i32.photobucket.com/albums/d3...n/untitled.jpg. would be an example....
What I want my Data Validation List to do is to look at column B and wherever it sees a certain color--for example, red, I want it to put the corresponding value in column A in the list.
View 5 Replies
View Related
Mar 5, 2009
In sheet 1, there are two columns, Category and Subgroup. The cell validation for Category is pulled from the category list on sheet 2. Basically, what I want to happen is depending on what is selected as the category, only the related sub-groups would be populated in the sub-group validation dropdown list. In other words, if Fruit is selected as the category, I only want Apple, Orange, Pear, Banana, etc to be in the validation drop down list for the sub group. If vegetable, then only Corn, Green Bean, Cucumber, and Peas should be shown.
I've included two options for the relationship list as I'm not tied to either style and not sure which would be easier to work with.
View 9 Replies
View Related