简体   繁体   中英

How to lock a cell in excel

I have a cell which has a formula in it and it also has a dropdown. Is it possible to lock the cell for the formula but still allow user to select the dropdown. Is this possible without macro?

What you want is a common request for some business models. Say A1 has a complex formula to calculate price. The formula is based on cost, overhead rates, sales tax, shipping costs, and desired profit. Because is complex, we need to protect the cell.

However, for certain customers, we need to ignore the formula and use a pull-down to get the price. The solution is to use three cells.

A1 contains the formula and is protected. A2 contains a set of pull-down values. The third cell contains the formula:

=IF(A2="",A1,A2)

This says that if ther is no over-ride value, use the formula. If ther is an over-ride value, use it instead.

You can right click on the cell and select lock cell. There are various options that you can choose to lock, Examine the tickbocks and select what you want. When you have made your choices you then need to protect the worksheet to activate your settings.

Here is what you want to look at on office.com

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM