+ Reply to Thread
Results 1 to 2 of 2

Code to clear specified cells of data, but leaving formulas

  1. #1
    Registered User
    Join Date
    12-14-2018
    Location
    Florida
    MS-Off Ver
    2016
    Posts
    28

    Code to clear specified cells of data, but leaving formulas

    Hello Again,

    I am seeking VB code or a macro that will automatically clear data entered into specific cells
    of a single worksheet at 11:59:59PM each night.
    It is important not to effect any Cell Formulas or Conditional Cell Formatting contained within that specific worksheet?
    It is as equally important not to effect the entered data in other worksheets.

    Thanks - Coop

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,150

    Re: Code to clear specified cells of data, but leaving formulas

    Try this way

    1. Place files:

    A. start_almost_at_time_0.bat.txt
    B. start_almost_at_time_0.vbs.txt
    C. your xls file (in this case it's Book1.xls, just for a try)

    in the appropriate catalogs (suited to your needs)

    2. Change the file extensions to "bat" and "vbs" respectively for files in points A and B

    3. To your "xls" file (standard module, e.g. "Module1"), copy the following macro:
    Please Login or Register  to view this content.
    and customize the sheet name ("Sheet1") and range of cells ("B2:F9)

    4. Register "start_almost_at_time_0.bat" in the windows schedule (with triggering in a shorter period of time, e.g. 1 min.)
    5. Check if it works, and if so, change the trigger for the target time (11:59:59PM)
    Attached Files Attached Files

+ 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. Replies: 1
    Last Post: 12-12-2017, 12:49 PM
  2. [SOLVED] Copy & pasting formulas, whilst leaving cells with values unchanged
    By happyfingers in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-02-2017, 11:36 AM
  3. Replies: 13
    Last Post: 10-05-2015, 08:59 AM
  4. Write to next 3 cells based on condition VBA while leaving formulas intact
    By iorivera in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-17-2015, 02:56 PM
  5. can i clear data except leaving Header row using vba
    By baig123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2014, 06:35 AM
  6. [SOLVED] can i clear data except leaving Header row using vba
    By baig123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-08-2014, 06:26 AM
  7. [SOLVED] Zeroing out data but leaving formulas.
    By clemrogan in forum Excel General
    Replies: 5
    Last Post: 10-05-2005, 04:05 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