Run Macro Based On Validation List Choice
Sep 3, 2007
I'm looking for a method, vba macro or Excel code, to preform the following task:
In the C column the user chooses one of several options from a menu, let's call these options 1 - 10 (this part is already done). Depending on the choise, different things are supposed to happen:
For 1-9, the formulas for cell A - Q on the current row should be copied to the next row (but with +1 in row number in formulas of course).
For 10, 3 blank rows should be created (well they already are blank..), on the forth row down, A3 - Q3 should be copied exactly. On the fifth row, the same formulas thing that was created for choise 1-9 should be created.
Since the real xls-file is too big already and it contains some sensitive information, I can't attach it here, but I made a small and similar xls-file, that better explain what I want to do.
View 8 Replies
ADVERTISEMENT
Nov 14, 2006
I have created a cascading data validation list, and I would like to have an adjacent cell auto populate according to the dropdown selection.
Data Eg:
Oranges 1100
Apples 1101
Pears 1102
Grapes 1103
If the user selects "Pears" from the dropdown list, I would like the adjacent cell to populate with the numerical code for "pears", in this case 1102. I am designing a new expense report form at the office, and I am at a standstill with this problem.
View 2 Replies
View Related
Sep 22, 2009
In all the cells in column F I have a validation list with several predefined choices, but at the bottom of this list I want an "Other..." option, which when chosen, enables the user to enter a new string in that cell if none of the predefined did not match.
View 7 Replies
View Related
Aug 10, 2008
I'm working on a simple worksheet, it is a tracking sheet for programs taught. What I'm trying to find is a code to insert a row based on a Data Validation List.
Exampl of data:
Column A is for " Name" then futher down Column K is "Program Taught" and Column L is " Date Taught".
Column K is where the Data Validation List is located with a in cell drop down.
What I would like to do is when a user selects a program from Column K a row is inserted with all of the formulas and formats from the previous row, and upon insert would like it to copy Column A into the new row.
This would be so I can keep a historical of programs and dates taught.
And to really spice things up I want to lock Columns K & L of the previous row after the new row is inserted.
View 4 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
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
Dec 17, 2008
I need to get data copied from sheet1 to sheet2
depending on selection in a validation list.
The data is on the same row and all the same range.
So it would look something like this.
A B C
Fruit Orange Apple Pear
Veg Potato Carrot Onion
Animal Bear Cow Dog
I have the data in A in a dynamic range and validation list.
I need all the data copied from the specific rows ie
choose Animal from the validation list in Sheet2!A1 and
the entire row Bear Cow Dog get copied to Sheet2!B1, Sheet2!C1, Sheet2!D1.
The second problem I think is a lot more complex.
So the same scenario above but this time its a multi select on Sheet3.
I need to be able to select two (or more depending on Fruit and Animals to display in A1, A2 and then their valid options to appear in B, C and D
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
Sep 19, 2006
Is there a way to trigger a warning box (ie - must be divisible by 50) when a specific entry is selected from a pull down validation list? The triggering factor is a correct answer to the validation so I do not think the error alert will work in this instance.
View 2 Replies
View Related
Mar 11, 2014
I've got a spreadsheet and I've used data validation to look at a list on another tab.
I need to be able to multiply values out based on what i choose on the drop down menu.
I've attached a sample spreadsheet to explain : tasks.xlsx
View 3 Replies
View Related
Aug 12, 2007
I'm trying to continue on this post: Populate Cells After Choice From Drop-Down
I'm trying to expand on CNL's idea. What I need to do is create a spreadsheet that autopopulates two blocks based on the dropdown box that preceedes it. I've got it to partially work, but can't figure out the next step. The differnce between my sheet and CNL's sheet is my drop-down is an indirect data validation.
The easiest would be to have my data in one long list, but my goal is to make it easier on the user to find the specific procedure (I'm trying to build a budgeting spreadsheet for a medical office). So in box A15 there is a list of the different service area, which gives a list of choices in C15 based on the choice selected in A15. My goal is to have G15 and G16 list the cost and charge respectively.
M1 - O3 is the data for Radiology
Q1 - S4 is the data for Labs
U1 - W4 is the data for Office
View 9 Replies
View Related
Oct 27, 2013
I am limiting choices in a certain cell to a list via data validation (using data validation, allow - list and pointing to the source). I want to limit the next set of choices in the next column (in this example in Column C) for the user based on the choice made in the adjoining cell. For example to keep it simple I will use the following: if the user selected "Fruit" in B1, then the options in C1 would only show "Oranges","Apples", "Pears". If however the user selected "Veg" it would only show "Cucumber", "Lettuce", "Spinach", "Radishes" in the drop down in column C. I can put a prefix in front of the column C data validation list if that is needed to narrow down e.g. FR-oranges, FR-apples etc.
A B C
1 Fruit Oranges
2 Veg Lettuce
3
Data Validation source for Column B (H2:H4)
Fruit
Veg
Nuts
Data Validation for Column C: (I2:I10)
Oranges
Apples
Pears
Cucumber
Lettuce
Spinach
Radishes
Almonds
Peanuts
View 3 Replies
View Related
Dec 30, 2011
I have a data validation cell that has 5 items to be selected, lets say A-E.
I would like a macro that checks and does the following:
A or B selected, hide row 25-34, rows 45- 53
C or D selected, hide row 24-44
E selected, hide rows 34-53
In each case, the macro should check and unhide all rows between 25-53 before doing the above
View 9 Replies
View Related
Jan 31, 2014
I have the following macro that exports pdf's for every value in a validation list. Currently it's setup where I have included each value in the macro. This is fine with just a few values but I am about to add 900.
My question is, is there a way to write the macro so it exports a pdf for every value within a dropdown list until it hits a null value instead of what I have below so i don't have to repeat everything for every value in the list?
Here is what i currently have.
Sub Export_MarketSpecific()
'
' Export_MarketSpecific Macro
'
'
Sheets("Home Page").Select
Sheets("MOA-Page 1").Visible = True
Sheets("MOA-Page 1").Select
Sheets("MOA-Page 2").Visible = True
Sheets("MOA-Page 1").Select
Range("D2").Value = Range(Range("D2").Validation.Formula1)(2).Value
[Code] ..........
View 7 Replies
View Related
Apr 23, 2008
I have a drop-down box(K6) When a style is selected I need to have data show up in other drop-down boxes (H3,L3,P3) These selections would only pertain to the selection in K6. They would change when a different style is selected. There are multiple choices in the secondary drop-downs. [IMG][/IMG]
View 9 Replies
View Related
May 1, 2008
What I need to do is create a Drop Down box. When a user makes their selection it gives another drop down box from what they selected. Each choice in the 1st drop down will give a different drop down box in the next field from what they selected in the 1st. I am having troubles getting this to work.
View 3 Replies
View Related
Feb 6, 2008
I currently have a drop down menu in one of my worksheets, in which I have several different text values entered. What I would like to do is link each of those text values to a numerical value, which would be entered in to another cell. So if I select "Option A" from my drop down list, and Option A is equal to 200, I want "200" to show up in another cell. If I select "Option B" from my drop down list, and Option B is equal to 400, I want "400 to show up in that same other cell.
View 4 Replies
View Related
Aug 22, 2007
I have a way of getting a cell value from having a data validation linked to a row of cells containing lookup formulas.. which in turn are looing at a table.
I have attached a small example.
The problem is the spreadsheet is a large one and i was hoping I could shrink the size of this by removing the vlookup formulas by having some kind of index/match/lookup formula inserted directly in the data validation.
I got this to work using nested IF formulas but its not very practicable!
The attached example has data validation in column A that selects the task type. Choosing this then changes the values in the vlookup area.. which then becomes the validation list for cell in column B.
View 9 Replies
View Related
May 28, 2011
Charting Data Based On Drop Down List Choice
I am trying to build a report where I can chart data base on a dropdown selection.I did build the dropdown lists, however I don't have any expertise on execel functions in order to make it work.I am attaching my draft report.
View 6 Replies
View Related
Oct 4, 2006
I'm trying to do is build a form that will allow me to select from a list of options, that links back to a catologue of data so that when i click on the generate button it will pull the data associated to the item selected from the list into a text box in excel. I have attached the form that I have created.
View 4 Replies
View Related
Jul 9, 2007
If there is away, to restrict the Time Out ( Cell B2), according to Time In (Cell A2), I mean if Time In is empty, then there should be no Data in list of Time Out, and if the Time In is 8:30, then the Time Out should have greater than or equal data in its list...
See the attachment
View 9 Replies
View Related
Jan 11, 2010
Is it possible to update certain rows only based on the choice selected from a dropdown list
I shall explain this scenario
I have attached a small excel sheet called TESTTHEM which i'm testing
and learning excel simultaneously. On the attached sheet
If i select a value in B4 as BusinessLogic, it should then lookup for relevent rows in MISC worksheet and copy C5:L5 from MISC worksheet and replace
the columns G4:P4
Is it possible to do this in excel?
View 13 Replies
View Related
Jul 23, 2007
I am using INDIRECT to create a second dynamic drop down list (L1) that is based on the cell contents of a first drop down list (I1). I want to create a macro that will blank the 2nd drop down list ONLY when the choice in the first list is CHANGED. I have the following, but it blanks the second list as soon as the first list is clicked on, rather than when a change is made:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Not Intersect(Range("I1"), Target) Is Nothing Then Range("L1").ClearContents
End Sub
View 2 Replies
View Related
Jul 13, 2007
I'm using a ComboBox ,ComboBox2_Change(), to Call and run 1 of 4 different macros. It works fine if I choose a different item in the list each time, but if I choose the same one, it won't run the macro a second time.
View 5 Replies
View Related
May 15, 2008
I have a worksheet with 7 macros each run from a seperate button. I would like to tidy up the sheet by having a combo box containing a description of each macro and one button to run the macro currently shown in the box.
View 4 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
Feb 16, 2012
In cell I2 I have a data validation list. If the selection is "2" then I want to copy and paste a value from another cell to another sheet.
I did a recorded macro but the code does not recognize the selection from the data validation celll, I2.
Is there some code I can add to get the macro to recognize what the user selected?
View 5 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