Clearing cells with formulas

  • Thread starter Thread starter Dan Wilson
  • Start date Start date
D

Dan Wilson

Good day. I am using Excel 2202. I have a worksheet that
performs daily resolution on my cash register. In the
worksheet there are four resolution forms, one for each
possible shift of the day. In each form there is a cell
that allows me to enter any missed refunds that were not
rung up. We do not allow the employees to do their own
refunds, only my partner and myself can do the refunds.

As such, my formulas allow that any refund not rung up
during the actual shift in which the refund occurs, can be
entered in the worksheet to prevent an erroneous
over/under situation for the employee for that shift. It
is then necessary to carry the missed refund into the
remaining shifts until the end of the day.

Therefore, the second, third and fourth forms have a
formula that looks at the previous form and if the value
in the previous form is not "0", then the value found is
carried forward. This is all working.

The problem occurs when a refund is missed in the second,
third or fourth shift. If I allow the user to enter a
value into a cell that currently contains a formula, the
formula is then lost. Since the worksheet is used on a
daily basis, I have created a Macro that cleanses the user
entry cells to allow a fresh start each day.

The problem of the user entering data in a cell containing
a formula is not an issue until it comes time to cleanse
the worksheet. The Macro is written to avoid cleansing
the refund entry cell for the second, third and fourth
forms so as not to delete the formula.

Is there a way to have the Macro reinstate the formula in
the refund cells whether a change has been made or not? I
thought of storing the formulas in other unused cells and
then copying them using the Macro, but I'm not certain
that this will work due to the way that Excel copies and
translates formulas between cells.

Thanks for the help, Danno...
 
Would it not be better for you to have an entry cell, and a running total
cell. This way would mean that the user could not overwrite a formula when
entering values for the other shifts.

For example: assume the refund cell is C10. Then on sheet1, the formula in
cell D10 would be "=C10" (omitting the double quotes)
On sheet2, the formula in D10 would be "=C10+'Sheet1'!D10"
Sheet3 then would be "=C10+'Sheet2'!D10" and finally Sheet4
"=C10+'Sheet3'!D10"
So an entry in C10 on any of the sheets would give an running total in D10

To clear the entries for the new day would obviously be resetting each
sheet's cell C10
 
Back
Top