+ Reply to Thread
Results 1 to 4 of 4

Clearing Adjacent Cells Macro

Hybrid View

  1. #1
    Registered User
    Join Date
    04-11-2013
    Location
    Indianapolis, IN
    MS-Off Ver
    Excel 2007
    Posts
    2

    Angry Clearing Adjacent Cells Macro

    I am wanting to auto delete anything in the cell(s) to the right of the current cell (in same row) when it is either changed. I've looked at a few different ways to do it (Clear.Content, etc...) but it took a long time to do it. Was hoping on a quicker way. I've attached a spreadsheet what the spreadsheet looks like. Anything with a letter in front, are cells I'd like to have data cleared when previous cell changes in that row. The cells that are highlighted auto calculate due to the previous cells and the final two cells.

    Thanks!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-10-2015
    Location
    Hoboken, Antwerp, Belgium
    MS-Off Ver
    2010
    Posts
    93

    Re: Clearing Adjacent Cells Macro

    Hi,

    How is the calculation done? By formula or by macro?
    If there's a formula in the cell that need to be cleared, the formula will disappear too. Or the formula must be changed that, if it's not a certain value in the previous cell, the cell itself gets an empty string.
    Greetings,

    Cheetahke

  3. #3
    Registered User
    Join Date
    04-11-2013
    Location
    Indianapolis, IN
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Clearing Adjacent Cells Macro

    Cheetahke,

    The cells I want to delete do not have any formulas in them. They are all drop down menus (data validation). The calculations (highlighted cells) are then done by what is pulled down menu results

    Thanks!

  4. #4
    Registered User
    Join Date
    10-10-2015
    Location
    Hoboken, Antwerp, Belgium
    MS-Off Ver
    2010
    Posts
    93

    Re: Clearing Adjacent Cells Macro

    If it's a dropdownbox that needs to be cleared, then you must clear the values in the Range where the info comes from. That info can be on another sheet, I couldn't see that in your example.
    If the activecel contains a dropdownbox, and the cell next to it is a normal cell than you can clear the cell if a certain value is found in the dropdownbox. I don't see another possibility.

+ 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: 3
    Last Post: 07-16-2014, 03:24 PM
  2. [SOLVED] macro for clearing cells
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-29-2013, 10:40 PM
  3. [SOLVED] How to adapt winnons macro for clearing cells to work when sheet is protected
    By nje in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 02-06-2013, 01:03 PM
  4. Clearing contents of adjacent cell.
    By Trevasaurus in forum Excel General
    Replies: 8
    Last Post: 01-30-2013, 10:36 AM
  5. Applying the same Macro to cells in adjacent columns
    By markvdh in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-25-2011, 07:49 AM
  6. Macro to enter calculation in cells adjacent to cells with values?
    By Samba1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-24-2010, 03:20 PM
  7. assist with search macro for adjacent cells
    By karl0709 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-06-2010, 08:06 PM

Tags for this Thread

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