Solved

Excel - disable formula

Posted on 2013-06-07
5
216 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

628 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