+ Reply to Thread
Results 1 to 2 of 2

I need to create a button that allows me to clear data but not formulas for certain cells

Hybrid View

all4ever15 I need to create a button... 12-12-2017, 12:43 PM
Mumps1 Re: I need to create a button... 12-12-2017, 12:49 PM
  1. #1
    Registered User
    Join Date
    12-12-2017
    Location
    Charleston
    MS-Off Ver
    office 365 pro plus
    Posts
    1

    I need to create a button that allows me to clear data but not formulas for certain cells

    Hey all!
    I'm about to chuck my computer so any help would be appreciated. I need to clear data from a cell but keep the formulas. This is a spreadsheet that will be used over and over with different data each time. I need to keep all formulas but clear the data. I need to do this in just a selected range of cells.

    I tried to record a macro where I go to find & Select >Go to special>Constants> Unclick Logicals and errors>OK>Delete. I then assign this recorded macro to a button. When I click the button nothing happens. Any other ideas??

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,103

    Re: I need to create a button that allows me to clear data but not formulas for certain ce

    On Error Resume Next
    Range("A1:A10").SpecialCells(xlCellTypeConstants).ClearContents
    Change the range to suit your needs.
    Last edited by Mumps1; 12-12-2017 at 12:52 PM.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

+ 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. [SOLVED] How to create a macro button to clear muliple cells on multiple worksheets
    By nje in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-03-2014, 06:06 AM
  2. [SOLVED] create a 'button' to click to clear cells
    By OAKLEY in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-13-2014, 07:12 AM
  3. [SOLVED] Button to insert new row, clear data and keep formulas
    By dragosnb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-24-2013, 07:52 AM
  4. Replies: 3
    Last Post: 06-05-2012, 04:36 AM
  5. Create a button to clear data in certain cells
    By headbanger51 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-07-2008, 03:18 AM
  6. create a clear button
    By jbf frylock in forum Excel General
    Replies: 9
    Last Post: 01-06-2006, 07:10 PM
  7. [SOLVED] Create a button to Clear Cells
    By tamato43 in forum Excel General
    Replies: 3
    Last Post: 05-15-2005, 10:06 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