+ Reply to Thread
Results 1 to 3 of 3

How to protect calculated column in a table from edit but allowing user to add rows

Hybrid View

TonyCrabb How to protect calculated... 05-03-2022, 01:06 PM
Keebellah Re: How to protect calculated... 05-03-2022, 04:42 PM
TonyCrabb Re: How to protect calculated... 05-04-2022, 08:22 AM
  1. #1
    Registered User
    Join Date
    05-03-2022
    Location
    London, England
    MS-Off Ver
    MIcrosoft 365 Apps for Enterprise
    Posts
    2

    How to protect calculated column in a table from edit but allowing user to add rows

    Windows 10 PC
    MIcrosoft 365 Apps for Enterprise
    Excel Version: Excel for Microsoft 365 MSO (16.0.13127.21886) 32-bit

    Hi, I have a simple example of a data entry form (on an excel table) with 4 columns for entry of quarterly financial data. i have a 5th column that adds up the 4 quarters into an annual cost per line. this is a calculated column in the table so adding rows automatically adds the calculation to sum up the annual costs.

    I need to be able to lock the annual column to stop editing while allowing new rows to be added. This is because i need to distribute the entry across a number of users and need to ensure they dont edit calculated columns.
    In the attached file, i have a simple table with one calculated column.

    I have unprotected the date entry columns (title, Q1-Q4 and left the annual caculated column locked.

    I have then turned on sheet protection.


    What I want to happen:

    - a user can add lines, delete lines, re-sort lines with the calculated column being locked and automatically added when new lines are added.


    What happens:

    - i get an error saying the sheet needs to be unlocked.

    It is currently protected so if you try to add a row you will see the error. If you unprotect the sheet (no password) you can add and delete rows fine but can edit the annual total which is what i need to avoid.


    Please let me know where I'm going wrong.

    Ta, Tony
    Attached Files Attached Files

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: How to protect calculated column in a table from edit but allowing user to add rows

    Hi, welcome to the forum.
    You would actually expect that seen the choices you have inserting or adding a row should be possible but it seems that it doesn't work.
    My option would be adding a macro that permits inserting a row or row to the table, but that means the workbook must be added to as trusted and with the new idea Microsoft has now to block all VBA by default is an extra caveat
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Registered User
    Join Date
    05-03-2022
    Location
    London, England
    MS-Off Ver
    MIcrosoft 365 Apps for Enterprise
    Posts
    2

    Re: How to protect calculated column in a table from edit but allowing user to add rows

    Does anybody have any other non macro thoughts?

    Or can anybody help with the Macro as that isnt something i have done previously?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Show UserForm with Continue/Cancel buttons, allowing user to edit sheet
    By dancing-shadow in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 01-16-2017, 05:33 AM
  2. [SOLVED] Show UserForm with Continue/Cancel buttons, allowing user to edit sheet
    By dancing-shadow in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-10-2017, 06:48 AM
  3. Code to Protect Sheet Allowing Format Rows & Edit Objects
    By Kristine T. in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-24-2009, 11:47 PM
  4. Protect Sheet Allowing Users to Format Rows/Edit Objects?
    By Kristine T. in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-16-2009, 04:38 PM
  5. Allowing user to select a cell but not edit it?
    By Falantar in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-26-2009, 09:18 AM
  6. [SOLVED] To Protect Excel documents and allowing only few cells to edit
    By DHANRAJ in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-29-2006, 10:20 AM
  7. [SOLVED] Protect spreadshet, but allow user edit range
    By Souris in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2005, 01:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1