locking cells

  1. M

    VBA issue with adding formulas and locking cells

    Hi everyone I have some VBA code that runs automatically based on when a particular cell is selected. I tried writing the code in such a way, that if the user swaps between the different options, every option will work, no matter the order in which you select them (in the event of a miss...
  2. W

    Locking cells in a row based on another cell's content

    I am trying to figure out a way in VBA to lock cells in columns A:C if the corresponding cell for that row in column D reads "Complete". So If D2 reads "Complete", A2:C2 will be locked, if D3 reads "Complete" then A3:C3 will be locked, and so on. Similarly, if D2 reads "Open" or is blank, cells...
  3. N

    How to lock cell's when the cell is empty

    I have an Excel spreadsheet with 90 cells that that are unlocked when I protect the sheet I'm looking to write a macro that will do the following when I run it: 1. Lock the sheet so only unlocked cells are able to be selected 2. Lock the cells B9:J9, B15:J15, B21:J21, B33:J33 and B39:J39 3. Lock...
  4. C

    Condition locking of adjacent cells

    Background: I have a spreadsheet that works pretty well for tracking events. For each event there are two drop down data validation lists located in column J and column K. The list in column J has values A,B,C. The list in column K has values D,E,F. Each row is one event. For each event, either...
  5. L

    Using Excel Shared Workbook with VBA code applied to 12 Worksheets

    I have a shared workbook which has 12 worksheets and each Worksheet has to following VBA code to lock cells after data entry: Private Sub Worksheet_Change(ByVal Target As Range) Dim cl As Range ActiveSheet.Unprotect...
  6. S

    Conditional Locking of Cells

    Hi all, I have a range of empty cells in columns A,B & C. If a value is entered in any of the cells A1, B1 or C1 i want to lock the other two cells to prevent data entry. This will then be the same for rows 1 through to 4 as shown in the table below.. <tbody> A B C 1 5 locked locked...
  7. M

    How to force cells to have a constant height

    I have a chart that I am making, and I set all of the cell heights to be at 7.50(10px) so that everything will fit just right. I set my font size to be 8pt and it fits perfectly. But every time that I refresh my pivot table, it makes the cell heights with information in them increase to 12.5...
  8. T

    Creating nested IF(AND) statement to produce correct data

    Hi there, I am working with a spreadsheet that deals with construction costs that is giving me trouble. In this spreadsheet, I am given the total cost of construction as well as the start and end date for the project. My goal is to approximate (on a monthly basis) what the total spend per...
  9. S

    Formatting and Locking cells on a condition

    hi, i have a requirement where i have to format the row based on the input in Column A also i have to lock few cells of that Row based on the input. for Example say the Data entered in column 'A' is 'MAIN', then i need to change the color of that row and also lock Cells of C,D and E for that...
  10. E

    locking specific cells that are hidden/shown based on VBA

    Hello! I am completely new to VBA, however am trying to learn as much as possible and could really do with some help here! I am having trouble with my VBA code, it hides groups of rows (projects) based on the contents of corresponding cells above. these have either 'yes' or 'no' in them...
  11. K

    Paste and automatically lock cells

    Hi, I am trying to write code that will allow data to be pasted into multiple cells and then have the cells that were pasted into lock. The code I'm using works if data is entered into a single cell however when I paste to multiple cells the code returns the error "Run Time Error 13: Type...
  12. S

    Saving, locking cells and others

    Hi there, Using Excel 2003.. I've got a workbook called "creditstoplist" this is like a masterfile that I don't want anyone to be able to touch so what I'd like is a bit of code that will take all of the colouring out of the cells below Row 7 across the whole spreadsheet (no fill) and then to...
  13. S

    Locking text in cells but not the ability to change colour of cells with mouse click

    Locking text in cells but not the ability to change colour of cells<ins style="text-decoration: none; display: inline-table; border: none; height: 60px; margin: 0px; padding: 0px; position: relative; visibility: visible; width: 234px;"><ins id="aswift_0_anchor" style="text-decoration: none...
  14. L

    VBA: How to lock cells after data entry

    Hi All, I am having some trouble with achieving my desired outcome in Excel. I am setting up a spreadsheet that gives the ability of the user to enter timmings for specific activities. I am using a timestamp whereby the user can click on column 2 & column 6 which is the 'Start' & 'End' time...
  15. B

    protecting the entire workbook except a range of cells

    Can someone tell me how to modify my code? I was locking out the entire worksheet and now someone needs access to a specific range of cells. This is what I am currently using....Thanks Cells.Select ActiveSheet.Protect Password:="1288", DrawingObjects:=True, Contents:=True...
  16. A

    Trouble locking cells....

    I am trying to set up an excel workbook that will run something like a time clock. I want certain cells to be locked to all without a password and certain cells to lock once a person has entered data into them. These will all be on the same sheet. I've gotten each to work without the other...
  17. I

    Sequencial validations in adjacent cells

    Hello all, Below please find the current code I am using to validate my values. Right now I have that upon entering a value in a cell it validates if it is between a certain range given by values in two cells, display a message and regardless if data valid or not locks the cell. What I...
  18. B

    Code for locking all cells

    Is there some code to protect and unprotect a sheet were it will lock all the cells? I currently have this. ActiveSheet.Unprotect ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
  19. J

    Locking columns within a table in a formula

    Hi all, Reaching out to see if there's a way to lock a column from a table in a formula. Here's the backgound: I'm using SUMPRODUCT formula, my arrays contain columns within a table, and the formula works perfect. The problem is that when I go to paste/drag the formula to other cells I can't...
  20. M

    Using Data List & Locking Select Cells affects list functionality

    Hello, I designed an employee expense report form in Excel 2003 using the list function. The form looks like a table, with 6 columns and 20 rows, and the user lists expenses in the last 3 columns. In the 20th row of the table/list, there’s an asterisk/insert row. This is handy if the user needs...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back