Locking Excel Cells in a VBA Code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • babs1979
    New Member
    • Nov 2007
    • 2

    Locking Excel Cells in a VBA Code

    I have a worksheet with a lot of formulas but would like to delete all the cells that are not associated with formulas. There are hundreds of them and it would take a lot of time to delete them. Is there anyway a VBA code can execute this by selecting the cells with formulas and locking them? Would appreciate help.

    Regards
  • Anouk
    New Member
    • Nov 2007
    • 1

    #2
    I don't know how to lock those cells,
    but I do know if you go to :
    Edit --> Go To... --> Special
    you can select formulas for example and then all the formulas in you worksheet will be selected

    Comment

    • babs1979
      New Member
      • Nov 2007
      • 2

      #3
      I already tried that but all it does is highlight the cells. I want like to have a procedure that locks them upon highlight and delete the values in the rest of the cells. Thank you though.

      Originally posted by Anouk
      I don't know how to lock those cells,
      but I do know if you go to :
      Edit --> Go To... --> Special
      you can select formulas for example and then all the formulas in you worksheet will be selected

      Comment

      Working...