I want to set up Data Validation on a cell / row of cells so that the value in that particular cell cannot be changed but all the rest of the sheet can be edited, thus why I am not using read only.
Currently if I enter the value in the cell, go to Data > Data Validation > Custom & enter ""it achieves this (see screenshots http://imgur.com/a/Ggqar)
What I want to do is set this validation via the cell rather than manually as I plan on writing this field entry when create the excel document through my application.
I have done a lot on searching online and found methods for doing countif etc.. but nothing deal with formula entry for the Custom criteria.
Is anyone able to help?
Thanks for the quick reply DanB but it's not exactly what I am trying to achieve. My end goal is that my application can pass a value into the file (Column A Row 1 [If easier for formatting it can go into each row in column A which is populated but not required]) and the file will be saved locally. The user will then be entering details in Column B, C, D, E, etc... on their local machine, saving it and processing the file again. I want the application to check Row 1 Col A for the value and decide on how to process the remainder of the file based on this value (the reading the values in the file works already). Because each time my application generates a file it will be unique I want to try do the Data Validation using a formula in the cell so that I can write it using my application and not have to manually apply settings to the file. Is it possible to do this kind of validation using only formulas in the cell when populating it?
Fastest solution would be to use a Protected sheet, but only protect that Cell.
To do this, select the entire sheet, and choose Format Cells.
On the Protection tab, remove the check from Locked.
Now, select just the cell you want to protect, and lock it using the same method. At this point, your entire sheet, except for the 1 cell should have Locked unchecked.
Now, on the review tab within Excel, choose protect Sheet, and uncheck the option to "Select Locked Cells".
Then, while the sheet is protected(you can password protect that part of it), that cell can't even be selected, yet the entire rest of the sheet can be.
Related
I have a large file with a Scenario Manager, where changing a single cell on the Summary worksheet changes the visible scenario throughout the rest of the workbook. Data Tables are working a treat providing the headline values for each option.
I'd like to have a drop down on each sheet that when changed will change the same single cell on the Summary worksheet, so I don't need to go back to the Summary sheet every time I want to switch visible scenarios.
This is a simple process if I'm using macros and would be the solution I'd normally jump straight to. But this needs to be done without macros and this is where I'm now struggling.
Does anyone know if this is possible (without macros) and point me in the right direction?
Josh
You can insert combo box (Developer Tab > Insert > Form Controls > Combo Box) on each sheet. Mention linked cell as a cell of the summary sheet (Absolute reference with sheet name). That cell will give you index of the item selected in the drop down list. Then you can insert index formula in the cell you want to change every time to get value of the drop down list. Once you insert it on one sheet you can copy it to other sheets. No macros required.
How to enable sorting on locked cells (columns) in Excel 2010?
Tried many methods, including what seemed to be the correct method (i.e. protecting sheet and leaving Sort option checked) but still unable to sort.
Example:
Question Answer
======== ======
What's your name? Johnny
How old are you? 703
I want Question column locked (so user can't change the question) and Answer column not locked (so user can enter answer!). But I want to be able to sort on the Question column.
This is the best I've been able to achieve. Allows sorting but user can't select (therefore copy) any of the locked cells. If the range is converted to a table, the user will also be able to use 'Auto Filters' using this method.
Every step is required.
Unlock every cell (Right click > Format Cells > Protection >
Locked)
Lock Every column you want locked (select entire column to
lock every cell in column)
Unlock headers - select entire first row
to unlock every cell in row
(this will allow sorting but also means
the header text can be changed by the user) (not required if range has been converted to table)
Add Editable range for
the entire worksheet - Review tab > Allow Users to Edit
Ranges > Range > New > A:AZ (the range you want to be sortable)
Protect worksheet - let them do everything but select locked cells (allowing select lock cells prevents sorting from working)
I imagine you can allow other permissions when protecting worksheet but I didn't need to so haven't tried.
In Access and Excel 2013, I am simply trying to import an Excel tab into Access. For some reason, Access is importing all 1,048,575 rows, but only the 42 columns I have in the Excel sheet. I am positive (through several methods and attempts) that there are no blank cells or random data entered into an obscure cell - its clean. Does anyone know why Access is bringing every row in? I have let Access dictate the primary key, created my own, added a column, etc - still brings in every row.
I appreciate the help.
Deleting (right click delete) all cells below the data, within the populated rows, configures the Used Range to the cells that contain data, rather than the final cell in the worksheet in Excel.
I have a large Excel spreadsheet and need to provide some automated sanity checks by selecting options from a couple of dropdown lists which have directly defined options i.e. in data validation values are entered directly instead of using a cell range.
I have tried writing a value to the cell but it is protected from direct writes.
I could add a cell range instead of directly defined values if need be.
Everything else works, opening the target spreadsheet, writing other values, reading back etc.
Thanks
Removing the protection worked.
The target spreadsheet takes a few seconds to perform calculations each time and I have not had to add any waits or status checks before reading the values back from other cells.
Ok - here's what I have.
An Excel file that asks a User to fill out some fields.
The first sheet has some fields to fill out.
To assist the User, some fields are dropdowns. This is to ensure that the correct index values are used.
The User clicks on a cell (in this case N65) and that cell displays a dropdown.
The values displayed are from Col 1 of a range on a separate sheet.
The User selects a Col 1 value (the description in my case).
The corresponding row's Col 2 value (index value in my case) is saved to another cell on the sheet that has this bit of function code in it.
ta-da. das it.
Works great in 2010.
When a user opens the file using 2007, no dropdown appears.
Here is what goes into the destination cell, the cell that will ultimately end up holding the index value from Col 2. In this case the sheet is named Craft.
=IF(ISNA(VLOOKUP(N65,Craft!$A$2:$B$501,2,FALSE)),"",(VLOOKUP(N65,Craft!$A$2:$B$501,2,FALSE)))
Here is a variant of that same bit using named range instead.
=IF(ISNA(VLOOKUP(N65,Craft,2,FALSE)),"",(VLOOKUP(N65,Craft,2,FALSE)))
In either example, when using Excel 2010, the field, R69 for example, ends up populated with the Col 2 value after User selects a Col 1 value.
Basically wherever you stick that bit of function code, that field will get populated with whatever the VLOOKUP grabs from Col 2 for the row that contains User's Col 1 selection.
The Craft sheet just has two columns with 501 rows:
Select a Value
Craft Desc 1 | Craft_1
Craft Desc 2 | Craft_2
Etc...
Does anyone have an idea as to how I can get this working with Excel 2007 and 2010?
Thanks!
When a user opens the file using 2007, no dropdown appears.
In Excel 2007 we had to create a range-name in order to use DataValidation with a List from another sheet, entering =TheRangeName in the Source box. In Excel 2010 this is not essential and, when defining the source, we can just highlight a range in another sheet. I suspect that this may be the issue.
You will need to correct the Data Validation settings to use =TheRangeName, instead of =Sheet1!A1:A4. On the Home tab click the Find & Select button and choose Data Validation. This will select all the cells on the current sheet that have Data Validation. Alternatively, click in a cell that you know has Data Validation and choose Go To Special from the Find & Select list; from here you can select all cells that contain the Same validation as the current cell(s). If you can't find any such cells then you'll need to recreate the validation(s) from scratch.
I ended up using pnuts suggestion. =IFERROR(VLOOKUP(DropDown,Codes,2,FALSE),"") The way I got it to work was on the worksheet with the desc & code I selected the Desc column and named it and used that in the Data Validation because it seems to only work with a single column. Then I named the range for both Desc & code for use with the VLOOKUP function and that worked.