Solved

Excel - disable formula

Posted on 2013-06-07
5
199 Views
Last Modified: 2013-06-17
Hi,

I have a worksheet where amounts are entered in columns A1 through A10. I don't want users to be able to enter formulas in this range. Is there a way to prevent user to enter the

= sign and type a formula?

conernesto
0
Comment
Question by:Conernesto
  • 3
  • 2
5 Comments
 
LVL 22

Expert Comment

by:rspahitz
ID: 39230809
One way it so lock those cells, which means to unlock all cells that you want to allow data entry into, then turn on protection.

Another way could be to add some auto-macro code so that when a user leaves a cell, it removes the equal sign at the beginning or otherwise manages user input.
0
 

Author Comment

by:Conernesto
ID: 39235203
I don't want to lock the cells as I need user to enter information. Can the formula be disabled for the range of cells?
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 39235287
If you want users to enter data, then you should not have formulas.  The formulas should be used to manage the data entry.
So it sounds to me like what you want is a column for data entry and another column for formulas (which can be locked since they should be read-only.)

If you want to lock a specific group of cells, just select the entire sheet and in the Format Cells' Protection tab, uncheck "Locked" and click OK.
then go back to the cells you'd like to lock (whatever range) and select Locked.
Finally, go to Home tab's Cells group, Format item and select Protect Sheet.  On the window that appears, uncheck "Select locked cells" so users can only access the unlocked cells.

(If you need to modify something there, go back to the same spot and "Unprotect Sheet")
0
 

Author Comment

by:Conernesto
ID: 39235573
I don't have formulas on the input column Cells A1 to A10. However, the user can enter the equal sign (=) and enter a formula on any of this rows. I want user to be able to enter say 100 but not =50+50.
0
 
LVL 22

Accepted Solution

by:
rspahitz earned 500 total points
ID: 39235692
ah, ok...I guess the easiest way is to format those cells as Text.  Select them then in the Format Cells window, "Number" tab (or directly in the Number group's Number Format item), change the Category to "Text".

It won't prevent entering an "=" but it will prevent Excel from evaluating it.

If you want to prevent it entirely, you'll need VBA, which can do a lot more but will also be more complicated to create if you want to, for example, skip all special characters like "+".
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question