Protecting One Cell Value From Being Deleted / Changed (Data Validation)

Dec 5, 2012

I have a cell in my spreadsheet (J3) that I need to never be changed or else other macros in my workbook will not work properly. I decided to try and use data validation since it is easy to change the rule every month and I can stay away from messing with passwords.

My cell value is a date, so I set data validation to have that cell equal only that specific date. If a user tries to overwrite the cell value, the error messages is prompted correctly. The one BIG problem is that I can just press the delete key and delete the contents of the cell. Is there any way of preventing this from happening without having to lock the cell and password protect the sheet?

View 3 Replies


ADVERTISEMENT

Event Code Errors When More Than One Cell Changed/Deleted

Apr 15, 2008

I used the code below for Conditional Formatting. This works fine but the VBA-code crashes when I delete more than one selected cell. Is there a simple modification possible to prevent this from happening?

Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("A1:C250")) Is Nothing Then
Select Case Target
Case 1
icolor = 6
Case 2
icolor = 12
Case 3
icolor = 7
Case 4
icolor = 53
Case 5
icolor = 15
Case 6
icolor = 42
Case Else
'Whatever
End Select

Target.Interior.ColorIndex = icolor
End If
End Sub

View 3 Replies View Related

Protecting File From Being Deleted

May 3, 2006

Is there a way to protect an excel file from accidently being deleted. I have a shared workbook, and I am concerned it might be deleted from the folder.

View 2 Replies View Related

Excel 2007 :: Protect Formulas For Being Changed / Deleted?

Sep 6, 2013

I have a lot of formulas that I don't want to be changed or deleted, but I still want the user to be able to enter data into the cells.

If I use "Protect sheet" I can't select a cell or enter something into it. I sure there is some setting I have to change, but I'm not sure what to select.

I'm using excel 2007

View 3 Replies View Related

Change Cell Value When Validation List Is Changed?

Mar 11, 2014

I have a cell that has a validation list. When i select a value from the list, i want the value of another cell to change automatically but it isnt working. The list source is pointing to another sheet:

=INDIRECT("DB_DAT!$J$268:$J$275")

I get an error when it tries to change the cell value. Its error no. 1004.

View 3 Replies View Related

Keep Cell Adding After Data Is Deleted

Jun 5, 2007

I've a worksheet with 36 columns to keep track of a football confidence pool,I've a CF in which a W is entered in every other column from B1:AG1 and it highlites the whole column yellow,in column A is all players names,from column B2:AG2 I enter the 32 NFL teams,in row B3:AG3 I enter points from 1-16,in column AI it adds all numbers in yellow per row which gives me a weekly score,in column AJ I've the players name and there year to date points and finally in column AL it ranks the players by highest point total.

I will use this on a weekly bases for 16 weeks,what I need is for column AJ to keep adding the players points once I delete there respective numbers from rows B3:AG3 and add new ones for the following week.

Formula in cell AI3 =sumif($B$1:$AG$1,"W",$B3:AG3) copied down
Formula in cell AJ3 =A3 & " " & AI3 copied down
Formula in cell AL3 =rank(AI3,$AI$3:$AI$8,0) copied down
I also have the following macro an my sheet which allows me to use the formula in column AI3.
Function ConditionalColor(rg As Range, FormatType As String) As Long
'Returns the color index (either font or interior) of the first cell in range rg. If no _
conditional format conditions apply, Then returns the regular color of the cell. _
FormatType Is either "Font" Or "Interior"
Dim cel As Range
Dim tmp As Variant
Dim boo As Boolean
Dim frmla As String, frmlaR1C1 As String, frmlaA1 As String
Dim i As Long

View 11 Replies View Related

Nested Data Validation: Figure A To Enforce Dual Data Validation On A Single Cell?

Aug 19, 2009

I'm trying to figure a to enforce dual data validation on a single cell. That is, I need to restrict the user to entering only a decimal value, only if a particular other cell (say A2) is blank. To put it another way, if A2 is blank, the user can enter a decimal value, but if A2 is not blank, the user cannot enter anything. I can use Data Validation to enforce either the decimal restriction or the ISBLANK, but I'm not sure how to make them work together.

View 2 Replies View Related

Change Background Color Of Cell When Data Has Been Changed?

Jul 10, 2012

I have 10 excel sheets that are filled with data some 20,000 each.

Some of the descriptions in that row need to be changed.

I wonder how I can create some kind of macro or formatting that will change the text color or the fill color as I make those changes automatically?

I can sort the list after that easy enough, pulling the color text or the fill color.

View 12 Replies View Related

Data Validation: Can I Use Data Validation In A Cell That Has Formulas In It?

Apr 3, 2009

I have attached a sheet that I am working on. I want cell G1 to be less than or equal to 165. That cell contains a formula. If the formula takes the number to over 165 the validation is allowing it.

View 2 Replies View Related

Deleted Data Leaves A Trace

Dec 8, 2009

I have a worksheet where I've deleted data in cells and rows. I am left with alternating rows of data and blank rows however a macro that I've been running to delete blank rows does not work on some of the rows.

To delete the data I used the Find and Replace feature and it seems that afterward the cells where this data was is now somehow marked as not completely empty. It appears empty but if I use the Control-Right Arrow combination from Column A, it skips over some cells but stops on a cell that used to contain data. If I press the Delete key it clears the cell completely and if I do that on all the cells the Ctrl-Right Arrow stops on until the end of the row, the macro works on that row...but not the next row of seemingly empty cells.

It's not spaces and there's no apostrophes and the cells are all formatted as General (Number Style) and Normal (Styles). I've even copied the format of a row of all deleted cells but that still does not completely clean out the "empty" cells. I've also run the Inspect Document command to remove what may be there but same results.

Is there something I can do to locate and remove this mysterious data?

View 7 Replies View Related

Merged Cells With Data In Are Being Deleted

Jul 23, 2012

I have a spread sheet with merged cells in that contain data, when i ask excel to seek blank cells and delete them moving the others up it also deletes the merged cells.

View 1 Replies View Related

How To Validate If Data In A Cell Conforms To Data Validation Rules In The Cell

Oct 14, 2009

I have an Excel workbook which contains data entry fields, which have different types of data validation rules - like Lists, Date, Whole Number.

I do not want end users to remove these data validations as well as the formatting of these cells by doing copy/paste. So, I have implemented techniques mentioned in the following post, and elsewhere - to override the paste functionality and implement PasteSpecial values automatically.

[url]
To keep it simple, I'm only supporting pasting a single cell at a time.

Now my problem is this:
Doing the PasteSpecial values programmatically doesn't prevent the user from pasting values in the cell that violate the data validation rules. So, I can paste a string into a cell having data validation as Whole Number, or a invalid string into a cell having data validation as List.

The following post just suggests disabling paste whenever data validation is present:
[url]

But I would like to allow the paste operation if the value being pasted is a valid value for the cell's data validation.

View 9 Replies View Related

Deleted Data Stays In Pivot Table..

Apr 22, 2007

I have been setting up some pivot tables. Down the left side of the pivot table is the values from a column labelled TRACKS. There are about eight different TRACKS. Say Track1, Track2, Track3, etc. I have set the data range up as a dynamic named range so that if more rows or columns are added to the data then the pivot table will automatically incorporate these.

Today I wanted to test that the pivot was working as expected. One of the things I did was stick a few extra values into the TRACKS column on the data source. These were TEST1 and TEST2. These appeared in the TRACKS down the left side of the pivot table as expected.

When I deleted these two test values, however, they would not disappear from the pivot table. There seemed to be nothing I could do to make them go away, except to rebuild the pivot table from scratch.

View 3 Replies View Related

Pivot Tables Do Not Refresh Contents When Data Is Deleted An

Apr 11, 2003

When we create a database in an Excel Spreadsheet and then some pivot tables, we use to copy the spreadsheet with another name, in order to clean the data and update it with another date (for instance, one excel spreadsheet for one BU or country, another one for other bU or country), to avoid creating the pivot tables again and again.

However, when we clean up all the data and enter the new one, on the Pivot Tables fields, you still see the "old data that was deleted"... Do you know if there is a way to delete that data without recretaing the pivot table?

View 9 Replies View Related

Protecting Data When Extracting From Another Sheet

Feb 17, 2010

I need is for the Roster sheet, which has the exact same column and row headings as the Leave sheet, to read the data from the Leave sheet and change dynamically if the Leave sheet is changed. If there is data in any cell then I need to protect just that cell in the Roster sheet so that the user creating the staff roster is unable to edit it out.

I have created a plain cut and paste macro on open from Leave to Roster but this doesn't give me the dynamic linking, and doesnt help solve the problem of needing to check each and every cell in Roster against a corresponding cell in Leave, but also if its blank in Leave to allow the user to update that cell in the Roster sheet.

View 3 Replies View Related

Protecting Data In Excel Workbook?

Mar 26, 2012

I am building an Excel workbook for use by many users in a company. The Worksheet that all users will be able to see and access will reference a Data tab that contains sensitive data. I know how to hide and password protect that tab, but just wondering if anyone can tell me how secure that is? In other words, if someone really wanted to get that data, how easy is it for the password to be broken? I will need to prove to management that the data is secure.

View 6 Replies View Related

Keep Reference To A Cell When Column Is Deleted

Nov 28, 2007

I have a spreadsheet in excel with scheduling information, each group of data (job) is made up over 2 columns and 6 rows and is in a block (this is so it is easy to view and manouvre)

I have a link in another worksheet that extracts information from the cell if a criteria in the group is met!

At the end of each day I need to delete the columns (B and C, which make up that day) in the schedule.

When I do this all the references in the other worksheet are messed up, even though the next day is moved to columns B and C.

I would like the link to the other worksheet to automaticaly recognise the new values in column B and C as the reference.

View 9 Replies View Related

Delete Cell When Worksheet Deleted

Jul 11, 2014

I want to delete a cell row in a table when I delete a corresponding worksheet with the same name as the cell.

For example, on the attached, if I delete the worksheet "Shawn" then I want row with "Shawn" deleted from the table on the "Example" tab. If I delete "Becky" worksheet then the row with "Becky" should be deleted from the table on the "Example" tab.

Delete cell when worksheet deleted.xlsx‎

View 4 Replies View Related

Rightclick Cell Menu Deleted

Apr 24, 2009

I was customizing my rightclick cell menu, for cells in certain columns, to add some links to files and then I would delete them when right clicked in some other column.

By mistake I deleted EVERYTHING from my rightclick menu. If found where the problem was so it wouldn't happen again.

So now I am trying to put back those basic commands in the rightclick menu , but I cannot get those 'icons' that shows up on left of each command. how to get that?

View 2 Replies View Related

Dynamic Named Ranges Where Data Is Manually Added And Deleted

Apr 22, 2013

A lot of the Workbooks that I design for use by myself and colleagues require data to be copied in from external data sources. To avoid named ranges from failing, I always use the following method:

Calculate the length of the data set:

Code:
=COUNTA(INDIRECT("'Data Sheet'!"&"$A:$A"))

(There will be no gaps in the data, hence a count is fine.) This named range is called DSROWCOUNT.

Example named range for the data in column A:

Code:
=OFFSET(INDIRECT("'Data Sheet'!"&"$A$1"),1,0,DSROWCOUNT-1,1)

I use INDIRECT to ensure my named ranges do not fail if the data is deleted (accidentally or intentionally), as #REF! errors will occur.

The problem with this method is that it automatically makes the Workbooks volatile because of the use of OFFSET and INDIRECT, hence the Workbooks always needs to be in manual calculation mode to be usable.

View 7 Replies View Related

Missing Gridlines When Table Data Subsequently Deleted From Sheet

Jul 23, 2014

On occasion I cut a table from a website and paste into Excel. If/when that data is subsequently deleted from the sheet the gridlines no longer show. I've tried turning the gridlines on and off to know affect. I've tried setting and clearing borders, but that made no different to the gridlines either. Even if I highlight the entire sheet and delete it makes no difference. I can't think of anything else to try.

View 2 Replies View Related

Protecting Data Sheet But Able To Use FrontEnd Userform

Dec 11, 2011

What is the best way to protect a Data sheet, but still be able to use a FrontEnd Userform.

View 4 Replies View Related

Macro Runs Fast When Rows Added / Deleted Slow When No Rows Added / Deleted

Jun 27, 2013

We have created a macro that basically looks for rows that contain an "H" and hides the row if it does.

Users can add new rows throughtout the year to this spreadsheet. and based on certain criteria, an H or U will be placed in a hidden column which the macro looks at and hides any row it finds an H.

The user has to click on the button that has the macro assigned to it once they have finished working on the spreadsheet.

The problem we're finding is that for users who insert/delete rows, once they click the button it takes up to 15 seconds to run through macro (which is ok). However, users who haven't added or deleted any rows and who click the button, they have to wait upto 5 minutes (which isn't ok) for the macro ro run.

We can't figure out why the macro takes longer to run when no changes have been made?

View 8 Replies View Related

Pivot Table Fields Expands Automatically When Updating Data (only Where Data Has Been Changed)

Jan 11, 2013

I have created a pivot table that is connected to an input sheet with data. The input sheet retrieves data automatically from a external source through an add-in to Excel. When updating data the fields expands, but only for the items which have been changed. I want the table to be updated automatically, but not the fields expand automatically. Is there any pivot options to prevent this problem?

It should be mentioned that the pivot table is not directly connected to the input sheet (which is updated from the external source), but from a "help-sheet" reflecting the input sheet with some additional columns. I use conditional formatting and name range in the pivot.

View 1 Replies View Related

Replace Deleted Formula When Cell Cleared

Feb 19, 2014

I'm not sure if this is impossible (surely not) or if I'm just Googling the wrong terms (most likely). I have a sheet that we use to record staff shifts and when they take their lunch breaks. By default most of our employees have a 1 hour lunch and they take it 4 hours after they start. So far so good, I've set up a formula to work out what time their lunch would start and end based on this.

N237: =IF(AND(L237>0,L237<>"NWD"),SUM(L237+(1/6)),0) - Lunch start 4 hours after start time in L237 (NWD = Non working day)
M237: =IF(N237>0,SUM(N237+(1/24)),0) - Lunch ends 1 hour after lunch start time in N237

However, not everybody follows the default - some people take lunch later, or don't take as long due to working shorter hours.

What I'd like to do is allow users of the sheet to overtype the times generated by the formulas when applicable, but if they delete their own custom value for lunch breaks I would like the formulas to re-appear and thereby return lunch times to the default values.

I could do this through VBA with a button to look for blank cells, but I would prefer it to happen automatically. Is this possible and if so what code would I need to make the magic happen?

I should maybe have mentioned that this sheet has space for 250 names and an area for each day of the week, so these formulas would appear in 1,250 different places

View 4 Replies View Related

Use A Named Range To Many Columns Are Added Or Deleted The Data Is Pulled Correctly

May 4, 2006

I have a spread sheet that I pull data from different columns on a particular row. The problem is the code I used works great as long as the column never moves from its current location. Is there a way to use a named range to make the following piece of code work, so no matter how many columns are added or deleted the data is pulled correctly?

View 2 Replies View Related

Data Validation Used To Create Separate Data Validation List

Feb 15, 2014

I have 2 columns First Name & Surname. What I want to do is create a data validation list on the surname which results in the 2nd data validation list only showing the first names which link to one of the surnames.

i.e. If I selected Smith in the 1st validation list then I would only like to see 'Paul' as an option in the 2nd list

First Name
Surname

Paul
Smith

Paul
Jones

Tony
Phillips

View 1 Replies View Related

Zero Showing In Cell With Reference When Entry Is Deleted With Delete Key?

Jul 1, 2014

When I use a reference to populate a cell in anothe worksheet and I use the delete key to remove the entry, a zero shows up in the cell of the worksheet wit the cell reference. For example if I use =AM!A3 and use the delete key to delete the entry in cell A3 of worksheet AM, the worksheet with the reference =AM!A3 shows a zero. Is there some way to prevent the zero from appearing in the cell with the reference?

View 3 Replies View Related

Comments From Dropdown List - Delete If Cell Value Deleted

Sep 11, 2013

I created comments to be shown when drop down list items are selected using the helper cell and workbook change solution from Leith Ross at the thread below.

[URL]....

This works perfectly to show the comments. What I'd now like to do is delete the comment if the content of the cell is deleted.

View 5 Replies View Related

Data Validation To Ensure Like Numbers In Cell A Has Same Date In Cell B

Jan 10, 2008

I am trying to set up a data validation to ensure that when a user enters a number in column A that matches a previously entered number in column A, the user is only allowed to enter the same date for the number it matches in column B.

For example, if:

Row 3 column A = 1320

and

Row 3 column B = 16-Dec-07

and

Row 15 column A = 1320

then:

Row 15 column B must be 16-Dec-07

View 12 Replies View Related







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