How to keep formula and be able to input value in cell?

Jan 4, 2016
Reaction score
I want to clear cells D1:D6 of the numeric values, but also keep the formula of those cells so the user can start over in case he/she makes a mistake or changes his/her mind regarding whether the cells D1:D6 have items or not. Is there a way to clear the values in the cells but maintain the formula? The user must first choose cell E29 which is a drop down menu and choose whether cells D1:D6 will have an item (data) there or be blank ("NO 20' item").

Here is the formula in the cells D1:D6
=IF(E29="20' Item","",IF(E29="NO 20'","NO 20' Item"))

E29 is a drop down menu

If E29 = 20' Item then cell D6 is blank and a numeric value can be placed in the cell.
If E29 = NO 20' then cell D6 shows "NO 20' Item"

Worksheet is protected from user with certain cells unlocked (D1:D6). If user chooses to have items in D1:D6 and inputs a value in the cells the formula is deleted. What VBA code do I need to keep the formula from being deleted but allowing the user to place values in the cells? and be able to choose the drop down menu and start over if necessary (initial condition when worksheet is opened)?


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question