EXCEL 2013 Macro code locks the method of a cell that contains a formula

Source: Internet
Author: User

We entered a number of function formulas in the Excel cell, gave the form to others, and feared that she accidentally changed the function, resulting in the subsequent calculation of the data error. How do I lock these cells? So that it cannot be modified? The method of using macro code can be accomplished.

① we open the Excel2013, press the ALT+F11 key on the keyboard to bring up the VBA code Editor and create a new module.

② copied the code in, and I added some comments to make it easier for everyone to understand.

The ③ code is as follows:

④ copy complete, return to the Excel interface, click the development tool-macros, select the macro, you can execute.

Note : More wonderful tutorials Please pay attention to the triple Office software tutorial section, triple Computer office group: 189034526 welcome you to join

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.