Jump to content


Photo

Over ride notice

Data Table

  • Please log in to reply
1 reply to this topic

#1 JPK1066

JPK1066

    Advanced Member

  • Members
  • PipPipPip
  • 101 posts
  • LocationHilton Head SC

Posted 28 September 2017 - 03:16 PM

I'm using a simple data table to compute nightly rates for a hotel. I've highlighted the cells that will be my input but I would like to let the user know that if they enter numbers into cells labeled: 

Base charge Taxes Cleaning fee Bottom charge

They will be removing the underlying formula to calculate the 'bottom charge'. How can I alert the user that these boxes are not input but output cells and changing them will corrupt the data table. Perhaps putting in a sequence that would alert or prevent changes from being made. 

 

Thanks,

 

JPK1066

Attached Files



#2 Jonathan

Jonathan

    Forums Administrator

  • Administrators
  • 887 posts

Posted 30 September 2017 - 11:06 PM

Hi JPK,

 

The simplest solution may be to apply worksheet protection so that your users cannot edit any cells other than the input cells.

 

You can see how to protect a worksheet in the video lesson: Expert Skills Lesson 7-11 Restrict the cells users are allowed to change.

 

If preventing editing entirely is too much of an extreme measure, you can use an advisory validation that will warn the user that they shouldn't edit the cell.

 

You can see an example of this in the video lesson: Expert Skills Lesson 2-8 Create user-friendly messages for validation errors.

 

I have attached a copy of your workbook with validation rules applied that will display a warning if you attempt to overwrite any of the formulas:

 

Attached File  Excel Data Table Sample 9-28.xlsx   12.16KB   60 downloads

Overwrite.png

 

I used a formula-driven validation rule with the ISFORMULA function that will show an error message if a user tries to enter a value that is not a formula. This will allow formulas to be edited but not replaced with values.

 

You can see how to create formula-driven validations in the video tutorial: Expert Skills Use a formula-driven custom validation to enforce complex business rules.

 

If you would rather that the validation triggered whenever any value is entered you can simply enter =FALSE as the formula.

 

I hope this is the solution you were looking for, but please feel free to reply if you need any more help with this.


Jonathan is part of the professional team who answer Excel-related questions posted on the ExcelCentral.com forums.
Jonathan also tests our courses prior to publication and has worked on all of our ten world bestselling Excel books for Excel 2007, Excel 2010, Excel 2013, Excel 2016 for Windows and Excel 2016 for Apple Mac. Jonathan has also worked on over 850 video lessons for or video courses covering Excel 2007, Excel 2010 and Excel 2013.
As well as extensive Excel knowledge, Jonathan has worked in the IT world for over thirteen years as a programmer, database designer and analyst for some of the world's largest companies.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users