locking cells

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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
  18. 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...
  19. 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...
  20. M

    lock certain cells

    I have a price worksheet with drop down menus. the salespeople can fill in all data necessary and it will calculate pricing and sales tax etc. the problem is that they can also change fornulas by typing over a formula. how do you protect certain cells but still allow functionality <input...

Some videos you may like

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top