+ Reply to Thread
Results 1 to 2 of 2

Macro for Clearing Contents of a Cell Based on Criteria - Graphing Purposes

  1. #1
    Registered User
    Join Date
    10-06-2015
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    1

    Macro for Clearing Contents of a Cell Based on Criteria - Graphing Purposes

    Hi,

    I need help clearing the contents of a cell based on current contents of cell via a macro. I would like to have the flexibility to identify 1) The Sheet Name 2) The column of the specific sheet 3) The criteria to identify (in the instance below #N/A). Once those are established - Delete all Contents - like the clear all function.

    Why, one may ask do I want to delete the entire contents of the cell as oppose to using formula logic to change the output. The answer is simply I'm trying to graph this data with a line chart and if the cell is #N/A it makes the line chart look contiguous by connecting the 10 to the 12 in the setup below. I would like it to instead just leave the dates 1/4/17 and 1/5/17 blank and leave a "lineless" void between 10 and 12.

    Here is the setup:

    Sheet 1
    Column A Column B
    1/1/2017 25
    1/2/2017 26
    1/3/2017 10
    1/4/2017 #N/A
    1/5/2017 #N/A
    1/6/2017 12
    1/7/2017 31
    1/8/2017 55
    1/9/2017 11
    1/10/2017 12

    12/28/2017 69
    12/29/2017 #N/A
    12/30/2017 55
    12/31/2017 11

    Thank you for the help! Really appreciate the assit

  2. #2
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    21,293

    Re: Macro for Clearing Contents of a Cell Based on Criteria - Graphing Purposes

    Clearing the errors is easy enough:

    Please Login or Register  to view this content.
    However, this will not restore them back to formulas later once you blank out the cells.
    Jeff
    | | |?| |?| |?| |?| | |:| | |?| |?|
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. Consolidating time in Pivot Table for tallying and graphing purposes
    By Thomaswu6 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-07-2014, 10:14 AM
  2. [SOLVED] Clearing cell contents that meet certain criteria for a very large selection
    By Pippin66 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-20-2012, 09:42 PM
  3. Replies: 5
    Last Post: 01-26-2012, 10:30 AM
  4. Clearing cell based on criteria
    By Pasha81 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-19-2010, 08:21 AM
  5. Help with clearing contents macro
    By Chadwick24 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-24-2009, 02:25 PM
  6. Macro Help for Deleting Blank Rows & Clearing Cell Contents
    By ksp in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2006, 01:25 AM
  7. Clearing Contents of Cell
    By Burt in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-04-2005, 10:06 AM

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