+ Reply to Thread
Results 1 to 10 of 10

Alert before overwriting hidden cell formula

  1. #1
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Alert before overwriting hidden cell formula

    I have a protected sheet with hidden formulas in column E but not locked.
    Occasionally the user must change the formula to a fixed number.

    Is there a way to display an alert in trying to modify these cells contents?

    Thanks

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,755

    Re: Alert before overwriting hidden cell formula

    Use a Selection Change Event handler to store the formula when you select a cell in column E. Use a Change Event handler to monitor changes in column E. If a change is made, display a message and seek confirmation. If necessary, restore the stored formula.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Alert before overwriting hidden cell formula

    Would you please show me?

    The formula starting in E5 is =IF(F4="";"";F4) coppied down to E157.

  4. #4
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Alert before overwriting hidden cell formula

    Anyone please help...

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,336

    Re: Alert before overwriting hidden cell formula

    Try something like this. paste into sheet Module.
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,755

    Re: Alert before overwriting hidden cell formula

    If you "Exit Sub" you won't re-enable Event Handling.

  7. #7
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Alert before overwriting hidden cell formula

    Quote Originally Posted by TMS View Post
    If you "Exit Sub" you won't re-enable Event Handling.
    Would you please quote the code you are proposing...

    Thank you

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Alert before overwriting hidden cell formula

    ...I think we assumed it was sort of obvious.

    add the
    Please Login or Register  to view this content.
    immediately prior to the Exit Sub
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  9. #9
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Alert before overwriting hidden cell formula

    Richard, with us, non experts, you can never assume....LOL

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,336

    Re: Alert before overwriting hidden cell formula

    Of course...My bad guys...Was not thinking....
    Last edited by sintek; 06-24-2017 at 01:08 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Alert before overwriting cells
    By cottage6 in forum Excel General
    Replies: 9
    Last Post: 09-18-2018, 02:38 AM
  2. Entering text into a cell without overwriting formula
    By shawnamillion in forum Excel General
    Replies: 7
    Last Post: 06-01-2017, 06:49 PM
  3. Replies: 8
    Last Post: 11-29-2014, 02:12 PM
  4. Replies: 4
    Last Post: 07-10-2014, 11:31 AM
  5. Add text to a cell without overwriting a formula
    By Johnald in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-18-2012, 11:32 AM
  6. Textbox overwriting formula in cell
    By DurinsBane in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-07-2007, 10:26 AM
  7. Turn Off Alert Before Overwriting Message Box
    By JR_06062005 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2006, 02:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1