Locking Column A Only
Dec 10, 2008
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("B:B")) Is Nothing Then
Application.EnableEvents = False
Cells(Target.Row, 1) = Now
End If
Application.EnableEvents = True
End Sub
everytime i lock the column a by using the protect sheet, the vba does not work or debugs. is there a way for me to lock the cell in column a when data is inputted or changed in column b? i am using date and time for column a
View 4 Replies
ADVERTISEMENT
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
Oct 10, 2008
I have set a set of cells to calculate dates from other cells and locked it so that people can not edit the date. The date will be automatically populated. However when i lock the cell, a debug error comes up says runtime 1004. I reckoned that when the column or cell is locked from editing, it will also unable to populate or run calculations. am i right?
View 9 Replies
View Related
Jul 22, 2007
I'm creating a map like image with Excel, and I've set the column width and row height to certain dimensions. Now I'm entering in some text into them, and I noticed that when I added in 2 digit numbers, the column width expanded a little bit. I want to prevent this from happening, and still be able to enter in the 2 digit text (since it WILL fit, and it's expanding to keep that extra bit of space).
Is there any way to lock the dimensions?
View 7 Replies
View Related
Apr 5, 2009
The first five columns of my table contain row titles. I'd like to keep these columns stationary while I scroll horizontally through the remainder of the columns.
As it is now, only the row number remains stationary, but I really don't need the numbers, just the row titles.
Is there any way to do this? And would this also be possible with column headings (so I can scroll down without them moving up)?
View 2 Replies
View Related
Apr 15, 2009
I'm using Excel 2003 and was wondering if there was a way I could Lock/Freeze the contents of a column. For Example:
Cell A1 has the formula =B1+C1+E1 - figure shown is £405
Cell A2 has the formula =C2+D2+E2 - figure shown is £650
Is there anyway I can freeze column A so when I delete column B,C,D,E ect the correct figure will still show?
View 4 Replies
View Related
Feb 26, 2007
In Excel 2007 I protect cells in certain cloumns in a large amount worksheets. By manually protecting or locking them. Once the sheets are protected without a password just blank and only select unlocked cells is ticked for sheet protection. I close the workbook and reopen it. These cells are now unprotected that were protected and theres always two ticks checked off for select locked cells and select unlocked cells.
View 9 Replies
View Related
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
Sep 24, 2006
This should be a simple question for those who have the knowledge. I am making a 2 column excel page, the first column will have an authors name and the second one will have the book name. I need to lock these two columns together so that author name and book name always stay together (side by side) on the sort command. I need to be able to sort by author or book title and I realize that it gives you the choice to expand the selection, but I can't trust that the others (kids) will realize the importance of doing so. This is going to be a very large list with hyperlinks and I can't afford to chance whether someone else will select the correct command. So a long story short. I want to build a list that can be sorted by author name or book name and be sure that the correct author will always be beside the correct book, but that are able to be independantly sorted
View 5 Replies
View Related
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
Mar 27, 2009
=IF(D2<>"",IF(A2="",NOW(),A2),"")
Whenever I type into field D2 it populates current date and time in field A2 and down the A column as I write into current D columns. The next step I would like to do in which he was able to figure out so far is how to lock in the date and time after something has been typed into D2. If I make any changes to the D2 field it updates the date and time, which I dont want to happen.
View 3 Replies
View Related
Mar 27, 2008
I have a user that is trying to lock certian cells within a spreadsheet but to allow certian users still to be able to edit these cells.
When this users is trying to do this and locks the cells it is locking for all users and not applying the "allowed" list of users to make changes.
View 9 Replies
View Related
Apr 1, 2008
is it possible to lock a worksheet. For example, i have a single worksheet in a workbook that i do not want people viewing. Is there any way that a password would have to be used to gain access to it? I have to keep the sheet inside this workbook because information is pulling from other sheets inside the workbook.
View 9 Replies
View Related
Oct 6, 2008
I did review some examples your members have already provided however I have a slight twist.
I have multiple users adding to a spreadsheet from which data is later copied to a master sheet. I need to lock ONLY cells which contain data when user chooses to save spreadsheet or saves speadsheet on exit. If the cells do not contain data, they should remain unlocked.
View 9 Replies
View Related
May 25, 2006
how to lock a graph in an unprotected worksheet?
View 7 Replies
View Related
Jul 28, 2006
top three or four rows so that scroilling down the screen leaves the title rows where they are .
I know that this is possible and have done it several times in the past, age however, dulls the memory and I have just forgot the procedure,
View 3 Replies
View Related
Nov 9, 2006
my spreatsheet calculations work, but the overall thing is too large to print; i am running many numbers and formulas. I made them all finally refer to a small 'summary' box which i created...but when i try to transfer the box to a new worksheet so that i can print it and only it; it automatically has no references for the formulas on the new (blank) sheet, and comes up all errors. to the point, how do i lock the way a box appears (when it contains formulas) so that it will remain sensible after it is transferred elsewhere?
View 3 Replies
View Related
Mar 29, 2007
I am trying to unlock a cell if another cell is a certain Value and if it is not that Value to lock again i have got as far as unlocking it but i can not get it to lock if the value is faulse. This is what i have so far!!
Private Sub Worksheet_Change1()
If ("K4") = "Daily" Then
ActiveSheet.Unprotect ("Password")
Range("F6").Locked = False
ActiveSheet.Protect ("Password")
End If
If ("K4") = "Monthly" Then
ActiveSheet.Unprotect ("Password")
Selection.Locked = True
ActiveSheet.Protect ("Password")
End If
End Sub
View 2 Replies
View Related
Mar 8, 2013
Is it possible to have a formula in a cell, based on the value in another cell, but if the other cell value is not true then allow for data entry in the cell
So
J10 executes a formula if the value in I10 (a list field) is 'Cash and Shares' =IF(I10="Cash & Share",ROUND(IF(AND(K10<>0,O10>0),K10/O10,0),0)).
However if the value of I10 is anything other than 'Cash and Shares' then do not execute the formula in J10 but allow users to enter another value.
Note: the cell needs to be locked. The worksheet will be protected and will allow users to Select Locked Cells and Unlocked Cells.
View 3 Replies
View Related
Feb 4, 2009
For example:
Locking a certain text boxes, and not others. Under review, protect sheet, the Edit Objects function is all or nothing
View 2 Replies
View Related
Apr 30, 2009
I need to lock consecutive rows together before sorting. e.g. A1 contains a name and A2 is blank: B1 contains data related to name in A1 - so does B2, and so on. Therefore need to lock rows 1 and 2 together, then 3 and 4 together and so on, but sorting on the data in the first cell of the group e.g. A1
View 3 Replies
View Related
Jul 29, 2009
Lock cells based on conditions? For example, in my spreadsheet I need my cell J42 to stay locked at all times unless my cell C12 reads "Klongtoey".
View 10 Replies
View Related
Jan 24, 2013
WILL IT BE possible to lock columns / cells for any user to avoid editing? Only the creator of the file should be able to edit?
View 2 Replies
View Related
Jul 16, 2013
Is it possible for 2 different persons to lock different cells on the same worksheet?
View 3 Replies
View Related
Oct 21, 2013
I am designing a car park rota on a spredsheet.Each person has a limited number of spaces. Is it possible to automatically stop people going in and deleting out entries from previous weeks (to stop any cheating!) or would I have to manually go in at the end of each week and protect.
View 7 Replies
View Related
Aug 19, 2009
I am trying to create a form that has multiple drop downs, which are dependent on answers from other drop-downs. I'm trying to make it super user friendly and have the cells lock, so that the user can tab through only the items that they need.
I have it almost down, but I'm not sure how to do it for multiple cells. The closest I come is one big long if,else statement which runs through the whole thing on every cell change.
I have an example of the spreadsheet attached.
If F1 says "Other", I want H1 to be unlocked
If F2 says "Y", I want F3 and F4 to be unlocked
IF F4 says "Other", I want H4 to be unlocked
View 2 Replies
View Related
Sep 23, 2009
I'm trying to set up a macro that locks or unlocks a column depending on what is put in the column before it.
at the moment i've got the code written in the worksheet
View 2 Replies
View Related
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
Dec 8, 2009
I found the following code which allows you to lock sheets 1 to 3 with the ActiveX control buttons located on Sheet4.
View 8 Replies
View Related
Feb 4, 2010
I have been having problems protecting my worksheets, using the normal manner, mainly it does not seem to work, So i came up with another idea, but cant seem to work out how to do it.
I have a workbook with about 7 worksheets, this needs to be sent via email to our customers, and on two of the worksheets the customer can enter there comments and then email back the workbook, the problem is that i cant protect the data.
So i was thinking is it possible to use VBA to program a function i can enter in to the toolbar that the user can lock all the cells in the whole workbox except for two columns when they finish entering in data, maybe with a password for locking it and unlocking for the original user so that they can unlock the cells for editing.
View 14 Replies
View Related