VBA Code For Locking Cell Disabling Dropdown Validation Lists

Mar 28, 2012

I am currently working on spreadsheet which is using a mix of Conditional Formatting, Validation and a bit of VBA code.

The spreadsheet is a log of vacancies and applicants, When "vacancy" is selected in A I have introduced some VBA code to lock down cells S:AT on the same row.

The code is working but the issue is it is stopping you using the drop down validation throughout the sheet, if you click the arrow that appears on the cell nothing happens, However you can still access the dropdown by right clicking and choosing the 'Pick from Drop-Down List' Menu Item.

The validation is set up by ranges from another Worksheet.

The Code I am using is:

Private Sub Worksheet_SelectionChange1(ByVal Target As Range)
Dim myrow
Dim StarLock, EnLock

[Code].....

View 2 Replies


ADVERTISEMENT

Dashboard With 2 Validation Dropdown Lists?

Jul 22, 2014

I have a dashboard with 2 validation dropdown lists - 1 for Brand name (text) and one for month (mmm-yy) which go and run various pivots, etc.This works perfectly - except the dropdown list is so small its unreadable.

So I've tried a workaround using Combo boxes which I found here:

This does work, but when I select a month on the 2nd Combo Box, it is then displayed in number format eg, 41699. I've tried changing the format to mmm-yy but it keeps displaying as a number.

Is there any way I can make it display as mmm-yy?

View 14 Replies View Related

Dual Data Validation Dropdown Lists

Sep 1, 2009

I'm trying to create a cell with multiple dropdown lists in E4 depending on a value from another drop down list in B4. Both E4 dropdown lists are named cell ranges RV_MECHANISM and VALVE_OPERATING_MECHANISM_TYPE. I know how to do this in Data Validation using an IF formula, however, that's not quite "bullet proof" or "idiot proof" enough.

I'm attempting to create a macro to load only the appropriate dropdown list in E4 as called for by B4.

I recorded the Data Validation dropdown lists using the macro recorder, then searched through all appropriate posts I could find at MrExcel and attempted to write the appropriate macro code as follows;

Sub RVorMECHTYPE()
With Selection.Validation
.Delete
.Add Type:=xlValidateList
If Range("$B$4").Value = "RV" Then
ValList.RV_MECHANISM
Else
ValList.VALVE_OPERATING_MECHANISM_TYPE
End With

Range("E4").Select

End If
End Sub

Compile error: End With without With

That's as close as I can get ... can one of you kind souls direct my macro coding paths and offer up the correct code for accomplishing this task.

View 9 Replies View Related

Template Using Validation Tool To Create Dropdown Lists

Sep 17, 2012

I have been working on a template using validation tool so as to create drop down lists. Now I have to select data from a combination of two fields.

Example: I need info from Dataset A and Dataset B to create a new drop down list from Dataset C.

I tried with If AND formula =IF(AND(B4="Test";B6="de10");"ok";"no") where due to the selected values I got Ok as a return answer. However I need to have a dropdown list of relevant values selected and I am having some issues.

When I name my group (Dataset C) as DE10 so that it can be linked to DE10 value (dataset B) so that I can do a validation then I get an error as DE10 is an excel field name; therefore I thought of the IF AND solution as I was thinking of doing so that I can name Dataset C as XYZ (instead of DE10) on the data sheet however I am having some trouble in getting the drop down list to work.

Basically I need a drop down list from dataset C when certain info is picked from Dataset A and Dataset B.

View 1 Replies View Related

Duplicate - Dependent / Related / Interconnected Data Validation (Dropdown Lists)

Jun 6, 2014

I have an Excel file with two different visible sheets (dashboards), each with different types of charts, which are pulling from the same data tables on a hidden sheet. I have a data validation drop down list on one of the dashboard sheets, which lists 7 items. Once one of the 7 item is selected, both dashboards update, which is what I want. However, I'd like to be able to have duplicated, related validation drop down lists. So if someone is looking at the first dashboard sheet and they select a new item, when they go to the second dashboard and see that same item, they could on that second dashboard select a new item without having to go back to the first dashboard.

I'd provide an example if I could, but cannot. I've tried searching on the forum for something similar, but most often the topic of dependent data validation is on two different types of drop downs with the second being dependent on the first, whereas I'm looking for two drop downs that are interconnected and can update in sync.

View 2 Replies View Related

Excel 2007 :: Dropdown Lists Not Deleting Even After Removing Data Validation?

Jun 20, 2014

I am having trouble delete a drop down list inspite of selecting clear all from the data validation tab in excel 2007. When I hit Alt + Down Arrow, I still see picklist options. I didnt set up the spreadsheet, hence I am not sure how to begin troubleshooting.

View 1 Replies View Related

Dependent Validation Lists Code

Mar 20, 2009

I have attached a file where I’ve made some dependent validation lists. When the first box is changes it clears the last 2 with this bit of code

View 2 Replies View Related

Dropdown Lists In A Cell

May 29, 2014

Im trying to create a spreadsheet which has a drop down list in a cell, then when a selection is made a predetermined dollar figure will be entered in the cell next to it.

For Example:

Cell A1 Drop down list I have 20 cities listed, If I select St. Louis, I want the cell next to it to populate with $250.

Every city has a different dollar amount tied to it. So any time I select a city I want the specified dollar amount to populate the cell next to it.

View 4 Replies View Related

Code That Automatically Run After Selecting Item In Data Validation Dropdown List In Column C

Oct 12, 2011

I have a dropdown list in C24:C50 (=CategoryList) with data validation and a sub list in D24:D50 (=ItemList) with data validation. I am looking for a way to have code automatically run after selecting an item in the data validation dropdown list in column C.

Example; I click on C24 and make a selection. I what it to trigger code that would move me to D24 and open up the data validation list in D24. After the selection in D24 I would like it to move me back and down 1 row to C25. I have not found anything directly related to this but I have found that code can be run after a selection in a valadition list.

View 2 Replies View Related

How To Get Multiple Dropdown Lists To Populate Results In Named Cell

Sep 28, 2012

I was just given a task at the office of creating a in depth excel spreadsheet. Here is what I need:

I have one drop down list that represents the state a person lives in.
I have another drop down list that represents the the type of property it is.

If you select CA in drop down 1 and Multi Family in drop down 2 you get the end result in (specific) cell.

Then if you select AZ in drop down 1 and SFR in drop down 2 you get different end result in named cell.

How can I get items within 2 different drop down list to call up the end result in a 3rd cell?

View 1 Replies View Related

Autofill Cell Based On Results Of Multiple Dynamic Dropdown Lists?

Aug 25, 2014

how best to do this (bare with me I'm not quite a pro at excel yet!). I'll attach my doc (JMP Excel Forum) so you know what I'm taking about. I've set up the data to work in a similar way to this, as you can see I've a table set up (Appliance Sheet) which feeds information to the Main Sheet which contains the drop down lists.

What I need it to do is autofill the wattage column (Main!F8 onwards) with the wattage for the device as described in Appliance!N3 or N4 for example. For the wattage column to equal 28 (equivalent to Appliance!N3) then the following would show in the dropdown selections Type>Computers SubCategory>Monitors Device>BENQ G2222HDL Status>On

Is there a way to do this with the set up I have?

I did have a previous version of the whole worksheet that each Device had its own table and I looked up the wattage using and If formula to lookup a info on the device and knowing where to look it up based on the subcategory

=IF(ISERROR(VLOOKUP(D7,IF('Main UI'!C7="Heating_Cooling",Appliances!$A$7:$B$14, IF('Main UI'!C7="Kitchen_Bathroom",Appliances!$A$16:$B$27,IF('Main UI'!C7="Monitors",Appliances!$A$52:$B$62,IF(C7="Computers",Appliances!$A$64:$B$68,........

And I got it to work but it was getting to cumbersome to add in new devices and update the formulas. If attached that doc (OLD) so you know what I'm talking about. The last two sheets are the same sheets that make up the new document (JMP Excel Forum)OLD.xlsm

I really prefer the new way I've got it set up. Its easier to add new information or options to the dropdown list

View 2 Replies View Related

Locking Different Cell Ranges Then Locking Whole Sheet With Macros

Jan 4, 2010

I have been assigned the task of creating our new integrated time and leave sheet in Excel 2007, previously we had 2 sheets, one for times and one for leave.

The problem I have is that I need to protect the authorisaton columns therre are 2 one for AM and one for PM, so that only Managers can authorise leave by inputting a password and then initialing the leave.

What I then need to do a the end of each month is for the manager to be able to click a Button with a Macro which will then lock the whole worksheet so that employees cannot change their times after the manager has checked the sheet.

I can lock the authorisation columns and password protect but I have to enable protection on the sheet, when I do this I cannot then figure out a way of running a macro which will then protect the whole sheet and assign a password to it so it cannot be changed after being checked and signed off.

I have tried to create a macro (button) to remove the protection on the 2 columns and then reapply protection to the whole sheet with another button but to no avail.....

If anyone has any suggestions I would be eternaly greatful.

Passwords on the sheet for the different buttons are abc or cobra.

You can download my Spreadsheet here.

[url]

View 9 Replies View Related

Populate Value Of Specific Cell Based On Two Other Dependent Validation Lists?

Feb 15, 2014

I want to populate the value of a specific cell based on the choices made from two other dependent validation lists.

I am attaching a workbook that explains what I need to do.

View 9 Replies View Related

Data Validation :: Selected From 4 Validation Lists

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

Dropdown List Validation - Associate With Same Previous Cell

Jan 8, 2012

I have a workbook with 4 drop down lists. The selection in list 1 determines what is shown in list 2. I wish to have list 3 dependant on list 1 also, but don't know how to associate 2 drop down lists with the same previous cell.

The first list is in cell C2 and the table of data needed for list 3 is AC8:AC27-AO8:AO27,including the column titles.

View 2 Replies View Related

Locking One Cell If Another Had A Value In It (conditional Locking)

Oct 10, 2008

I recently posted a thread on locking one cell if another had a value in it, and vice versa for the other cell. I got this great response (thanks se1429!) and it works GREAT, but I failed to mention that the worksheet is password protected. It asks for a password when I enter a value in one of the cells. I just need help adjusting this code so I can put my password in the code and allow the worksheet to unlock and lock at will by using this password.

View 9 Replies View Related

Select Multiple Criteria From Validation List Dropdown (populate Same Cell)

Aug 8, 2012

I have a validation list drop down box set up to reference data in a defined name list. I would like to be able to select multiple values from this list to appear in one cell (preferably separated by a comma). For example, the defined name list contains the following data:

Choice 1
Choice 2
Choice 3
Choice 4

I would like to be able to populate one cell with the following via the drop down list: Choice2, Choice 4

Is this possible and if so, how?

View 8 Replies View Related

Dropdown Lists Data Went Selected Won't Show In Next Dropdown Only Remaining Data

Mar 11, 2013

I am trying to pull data from more than one drop down but don't the same data to show if already use, example as follow:

First drop down Contains:- Pants
Shirts
Hats
Shoes
Dresses

if I chose Hats it should not show up in the second drop down

second drop down Contains:- Pants
Shirts
Shoes
Dresses
Is this done in data validation or combo Box? if so how?

View 2 Replies View Related

Code Locking Up

Apr 13, 2008

I'm trying to run the below code, but every time I do, it locks up excel. The code is running on 900 rows of data within the "loop to delete rows" section and in the main for loop there are 49 values to evaluate for the string strSA. how I can improve this code? When I step through it with F5 it works fine.

View 14 Replies View Related

Two Dropdown Lists Associated With One Set Of Assets

Jun 3, 2014

I'm trying to figure out how to make a spreadsheet where in one column a type of asset is entered through a drop down menu and then the next few columns are attributes - model, pattern, manufacturer, etc. - that would all have values entered through drop down menus populated based on the choice of 'type of asset' in the first column.

I can get a drop down menu for the 'type' column and a dependent drop down in the second column based on choice of 'type' using =INDIRECT(), but I do that by naming the dependent lists of models for each type after the types listed in the list of types. Once I've done that I can't name the lists of patterns after the types because those names are in use by the model lists. So how would I make multiple lists of attributes associate with the same list of types?

View 7 Replies View Related

Link The Different Dropdown Lists

Feb 27, 2009

I have a work book that contains various sheets with different information.
I have two different categories in one of the sheets,1 which contains counties and the other containing districts.

I have done a validation for the county which allows me to pick a county from a drop down list which works fine.I would like to create a drop down list for the districts aswell such that when i select i.e southyorkshire from the counties dropdown list,the districts drop down list will bring only districts in southyorkshire,excluding all the other districsts.hopefully i'll like the same to apply to all other counties.

View 7 Replies View Related

DropDown Lists Not Appearing

Dec 10, 2008

I have a workbook with several drop-down lists. The names for the lists are on a seperate sheet in the same workbook. I have used data-validation and allow list in all the cells with drop-downs. I have used =NAME in the source. I opened the workbook this afternoon for the first time in a couple of days and I am no longer able to select from a dropdown. I can type in the cells, but if I type something not included in the list, I get the "The value you have entered is not valid" error. So I feel like the validation is working on the cells, I'm just not able to select from a drop-down list. "In-Cell dropdown" is selected.

View 9 Replies View Related

Dependent Dropdown Lists

Dec 28, 2006

I have been able to use the previous information to create dependent drop down lists but I have been unable to apply the settings to entire columns versus just one cell.

Is there a way to get the dependent lists to correspond to the cell beside it without having to manually type in each cell name?

View 9 Replies View Related

Code For Locking A Row Of Headings

Nov 20, 2009

My questions is how to "freeze pane" a row of headings on the Results page and post the results onto row 2 and downward *without* deleted row 1.

If you look at the attached file, you will see a tab that I created called "My desired Results Page" that simply has a frozen row of cells. Instead of just displaying the rows from the Details page on the Results page, I'd like them there but with the headings at the top.

Is there code that can do this?

View 5 Replies View Related

Locking Cells Through Code

Feb 16, 2007

1. When I put data into one cell I need three other cells to be locked and not allow data to be inserted unless the data from the previous cell is deleted.

2. I have attached the Excel sheet for better understanding.

View 2 Replies View Related

Validation Lists Using Vba

Mar 30, 2007

I need to find a solution that will prevent users from pasting values into cells that do not match values in a named range or validation list.

I think the best method would be to have it trigger with a SheetChange event. I would like it to check to see if the enteredpasted value(s) in a range of cells is equal to one of the following:

K
1
2
3
4
5
6
7
8

If it does not, I want the cell cleared and a message box shown.

I am sure this is simple, stock code for someone, but I am teaching myself vba and am fairly green. Does anyone have this handy in thier code library?

View 13 Replies View Related

Lookup Or Dependent Dropdown Lists?

May 20, 2014

I'm trying to simplify a template we use regularly at work. On the front end page, the one that eventually gets turned into a PDF and sent to a customer, I have a selection of drop downs, which I am pretty comfortable with. I also have some other fields that are populated by vlookups, and again, I have no problem there. What I am struggling with is creating a second drop down list that only has options relative to the first drop-down list. From what I gathered by searching on this, I may have to change the format my data is in, note that I have a pretty basic knowledge of excel.

Master Data (from where I want all the drop downs to come from) - see attached screenshot.

Capture.JPG

So, on front end, I have a drop down that selects from column A. Beneath that there are two rows that auto-populate depending on what company was selected in the drop-down.
What I want is a second drop down list from D, E & F.

So, If I select ABC Limited in the drop down menu, the second drop down should only have John, Jim & Jane as options.

Is it possible to do this with the data in the format I have, or would I need to change the format? I have +/- 500 entries to do, so obviously I'd like to not change my format if possible.

View 5 Replies View Related

Dropdown Lists Based On Formula?

Mar 11, 2014

In worksheet 1 I have a list of employee numbers (column A) and and names (Column B)and in worksheet 2 I have a list of employee numbers (column A) and their payroll contracts (Column B). 1 employee can have multiple contracts).

What I'm trying to achieve in workshet 1 is to have a dropdown list ( Column C) which returns just the contracts that relate to the employee number in column A.

View 7 Replies View Related

How To Make Few Dropdown Lists Depending On One Before

Jan 7, 2014

how to make few dropdown lists depending on one before.

Example: I have table with next data: COLUMN A: (A1) Expense Type ( in all columns under A1 are types of expenses );

(A2) total trip cost;
(A3) Prize promo tour cost;
(A4 ) court renting cost;
(A5) Prize IPP cost

In columns B1, C1, D1, E1 are cities. Under each city is value for type of expense. I have uploaded worksheet for example.

Now, problem is next: I am trying to make drop down lists ( in new work sheet ) by using depending data from data table.

1.I made drop down list in first cell (let's say it is an A1 cell ) where I can chose city ( for example City of Zagreb ).

2.Then in next cell (B2) I would like to choose type of expense in drop down list ( for example Total trip cost ).

3.Finally, in C3 cell I would like to make drop down list that offers me just expense value for combination of chosen city ( Zagreb ) and chosen expense type ( Total trip cost ).

View 5 Replies View Related

Creating Dependent Dropdown Lists?

Sep 23, 2011

I am trying to get a listbox I created in from DataValidation to be dependent on another list.

For example, when I select Course 1 (a list item) from the Course List drop-down, I want the cost to auotmatically populate in the Cost drop-down (the other list).

How do I get this to happen? Here is the code I created in VB, and I am not sure if this is the right course of action:

Sub Automated()
Sheet1.Cells(2, 1) = "MATLAB"
If (Sheet1.Cells(2, 1) = "MATLAB") Then
Sheet1.Cells(2, 3) = "31"
End If
Sheet1.Cells(2, 1) = "INCA"
If (Sheet1.Cells(2, 1) = "INCA") Then
Sheet1.Cells(2, 3) = "41"
End If

[code]....

I don't want to use the user form, however from VB. I want to use the regular drop-down. The code seems to work, but, each list item in the drop-down is not pulling the data I want it to. I need to activate the drop-down as a click event somehow. It's just recognizing the cell A2 as a whole and not the individual list items. I want to each list item to be their own object, and to automatically populate the cell C2 with their cost when they are selected.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved