Preventing Cells From Deletion
Apr 11, 2007How can I protect individual cells in a range from being deleted when I want to delete data from the surrounding cells??
View 3 RepliesHow can I protect individual cells in a range from being deleted when I want to delete data from the surrounding cells??
View 3 RepliesI am trying to make a userform in my excel document that will allow the user to select (perhaps from a combo box) and delete a sheet they want. More sheets will be added and so the combo box or whatever should be able to reflect this. It should prevent them from deleting sheets I specify in the code as well. I've had a quick go doing this myself but I decided to start again as I had soo many problems. I think I just did it in a very long-winded fashion, so I would be interested to see what people come up with.
View 2 Replies View RelatedI have a workbook that contains 2 worksheets. The first worksheet contains all the data. The second sheet contains formulas that reference (absolute for all) the first sheet.
I run into problems (actually the users do) when the data set is updated with new information. Sometimes the users will delete all the data rows first and then copy the new data to the blank cells. When they do this, it messes up the formulas with #REF! error. Is there a way to prevent this? or is there a way to hard code the formulas so I don't get this error?
I have a workbook that is going to be used as an offline 'database', recording issues being worked on and all the necessary details e.g. time logged, user, problem type, comments etc. A lot of this will include vba for automation and validation etc.
This will then be exported in comma seperated .txt format. So I don't want anyone putting a comma in a normal field within Excel. I'm sure I remember a way of blocking certain character entry a few years back when I was working on a similar problem. However, time is getting the better of me so is anyone able to help save me some time and point me in the right direction? Trying to find a suitable search string for this question is proving tricky.
if it is possible to prevent a listbox from showing blank cells.
I have selected a big range and many of the cells are blank. The reason is that I want the listbox to update automatically when I add a value to any of the blank cells.
Using the methods suggested by the posters here I was able to solve my problem. I had to modify my source data somewhat but it was well worth it.
I have a workbook used for scheduling purposes and you can add hours to it by typing in D+1 or D-1, etc. I want to prevent this from working and just ignore the cell if the cell contents say "DC". I've tried to adjust my formula but haven't had any luck. I've attached an example worksheet with the formula for an easier understanding.
Formula: [Code] .......
Attached File : Testsheet.xlsx
I've got a table that has to be manipulated by multiple users. Within the table I have several column ranges with validation lists (in drop down boxes) in order to limit responses. However, I'm finding that most of the users are pasting data in from other sources that may not have been in the validation list, or may be in a different format, etc., and it essentially undermines the reason for using the validation.
I've tried protecting the sheets using various options and tried looking around online for a solution, but I'm not finding how to get around this.
I would like to protect some cells of a spreadsheet, without using Excel's protection, because I only want to prevent the deletion of those cells - the cells must remain editable.
View 4 Replies View Relatedi have made a document for other users to use. how can i limit the paste function to ONLY ALLOW PASTE SPECIAL-- i wish to aviod damage to formatting and formula etc
View 3 Replies View RelatedI'm getting a type mismatch (Runtime Error 13) with this code. What I want it to do is delete the contents of the cell if it contains 'N/A'.
Sub RemoveNAs()
Dim word
word = "N/A"
For Across = 1 To 5
For Down = 2 To 150
Cells(Down, Across).Select
If Cells(Down, Across) = word Then
Cells(Down, Across) = ""
End If
Next Down
Next Across
End Sub
is it possible to delete/remove all non use cells
for example if i only want the cells A1 THROUGH TO O31
all the rest removed??
I have completed an automated time sheet but have realised that there are some days where overtime entries make it go wrong.
There is one column where you enter an overtime shift when the cell has an entry I need all the other calculations to be zero
A1 START TIME
B1 END TIME
C1 HOURS WORKED ARE CALCULATED using a formula
D1 OVERTIME COLUMN ( IF AN ENTRY IS PUT IN HERE MANUALLY I WANT C1 ALWAYS BE 0
I tried various ways with isblank but just get true or false.
I'm working on a employee evaluation form. I'm using a Pass/Fail system.
I have a cell designated for PASS & one for FAIL. In these cells, I would put
"YES" if they passed, "YES" if they failed that section.
How can I prevent someone from mistakingly entering Yes in both cells?
I've generated a sheet where, based on the total run hours of a generator set using a given fuel type, we can determine which engine to run on what fuel when. The problem I've run into is that if more than one engine has the same runtime, the chart returns just the lowest numbered engine and eliminates the remaining engine(s). What I'm trying to do is make it so that when this occurs, the suggested engines show up in numerical order. For example instead of 1, 1, and 1 showing up on the chart, something like 1, 2, and 5 will show when they all have 0 run hours. I've attached my chart below with some engines having the same runtimes. RunOrder.xlsx
View 5 Replies View RelatedIs it possible to prevent the VBA window from popping up if an error occurs when running a macro and the user then selects debug? I've locked the code for reading but I was still able to change the code and save it!
Basically, I want the code to be unchangeable unless done through a known password. What I don't want is some user who may accidently stumble upon the code and change it unwittingly (or voluntary).
Is it possible to prevent a user from being able to move a userform around the screen area (clicking and holding caption bar)? I am captureing a image and using Pixels coordinates on the capture and need the userform to stay in the center of the screen or the image will not be catptured. The StartupPosition is center of screen, tried
View 2 Replies View RelatedI am using the following COUNTIF formula which I am sure is supposed to prevent '#N/A' from appearing (According to [url]
View 12 Replies View RelatedI have made an integrated timesheet for everyone at work. Problem is, people will be funny-beggers, and want to password protect their workbooks.
I want to be able to prevent EVERYONE from creating passwords to protect their workbook.
I would like to prevent the user from inserting rows. I know that ater versions of Excel have built in "Protection" features which would easily accomplish this. Unfortunately, our company uses Excel 2000.
I have keyed in a constant value in cell B100 ("bottom" of the practical range). I have tried ...
Private Sub Worksheet _Change (ByVal Target As Excel.Range)
MsgBox "Range" & Target.Address & "Was Changed."
If Range ("B100").Value = "" Then
Application.Undo
MsgBox ("Do Not Insert or Delete Rows")
EndIf
End Sub.
The problem with the above is: The "Change" macro does not seem to detect the insertion of rows. It does, however, detect the deletion of rows.
I have an Excel 2007 file that is a work of art. Users manually copy several rows and columns from a table on a web page and paste it into my Excel file. This turns my beautiful Rembrandt into a Jackson Pollack mess. The formating of my cells is replaced with the formating from the web page. Is it possible to make the Excel file ignore the formatting of the data being copied? As a default?
View 9 Replies View RelatedI have this code,
If Not Intersect(Target, Range("h15")) Is Nothing Then
If Target.Count > 1 Then Exit Sub
If Target.Value = "Ratio" Then
If UF.Visible = False Then
UF.Show
End If
Else
If Target.Value = "Acid Test" Then
Sheet2.Visible = xlSheetVisible
Sheet1.Visible = xlSheetHidden
Sheet2.Activate
Application.Goto Sheet2.Range("A1"), _
Scroll:=True
End If
End If
End If
The code works fine. However, if the target cell contains the word "Ratio", and the user opens the drop down menu in then cell and selects the work "Ratio" again, the userform displays. I only would like the userform to display if the cell went from being blank to "ratio" or from being another value to "ratio".
i would like the other tabs to be still visible to the user (so not hidden), but they should not be able to go to those sheets. (clicking on their name should so nothing)
I am using Excel to maintain a database for a computer game I'm playing. One of the things I'm using it for is to keep track of wages that I'm paying in the game. I do this by keeping the total potential wages in one column. As I only pay an employee when I use him, I then copy the wages over to the next column, where the total actual wages per event is calculated. However, when I copy the value from one column to the next (using the lack cross on the bottom right corner of the cell to drag it to the next) the value sometimes increases by one each time.
This isn't a major annoyance, but I'd like to find a way to prevent it happening at all. Does anyone know how to stop the increase?
*
A related issue that I experience is that sometimes when I copy or input a value in these columns, it brings up an error message saying "Number Entered As Text". Is there any way I can prevent this? Both these issues occur apparently regardless of formatting, and only on some of the cells, so I don't know quite why there's any problem at all.
I have a worksheet with a Change Event and a Selection Change Event.
When a cell is changed first the Change Event triggers and after that the Selection Change Event Triggers.
I have implemented a solution whereby I set Application.EnableEvents = False so that the 2nd Selection Change Event does not trigger.
However, the problem is that I need to turn EnableEvents back to True so that it can continue monitoring for events.
Is there a way to either only allow 1 event to trigger? Or is there a way to turn the Events back on after a pause of a 1 second or so?
So I have this table... At the bottom of the table the Outer Fences. There is a column at the end of the table that calculates if the value in the row is outside the fences. I tried to do this by using the cell (say, H1500) in the if statement, but as I continued down the column I noticed that row 2 used H1500, row 3 used H1501, row 4 used H1502, and so on. So I have been just entering the new fence numbers as the data changes. Is there a way to go into the if statement and somehow "lock" the cell value so it doesn't change?
View 2 Replies View RelatedI've the following formula but some of the results are returning the #DIV/0! result I know I need to bring some logic into my formula to rectify this but am at a loss as to how to do this.
=SUM(1/COUNTIF(AB:AB,AB:AB))
THis looks close to what I have been trying to find for months but what if I want to delete duplicates after pasting instead of making an error code? For instance, I have a list of names and addresses and I want to delete any entire row with a duplicate address.
View 9 Replies View RelatedHow do I prevent or allow text to be entered into a Cell or not. Ie if cell A1 contains the word "Text" I want text to be able to be entered in A2, but if A1 contains "No Text" if want to prevent text being entered A2. Is this possible, if so how?
View 1 Replies View Relatedif it is possible to prevent a workbook from being saved other than by a macro (So no saves on Ctrl + S or File Saves). Basically, I want to allow users to use a template that I have set up, but I do not want to allow them to be able to save the document.
View 9 Replies View RelatedIs there any way that the #N/A can be turned off or hidden and the cell left blank?
View 6 Replies View Related