+ Reply to Thread
Results 1 to 2 of 2

Automatically delete cells based on adjacent cell color

  1. #1
    Registered User
    Join Date
    08-10-2011
    Location
    OC,CA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Automatically delete cells based on adjacent cell color

    Hard to explain, but is there any way to make a formula that deletes the cell to its' right if the cell is gray?

    Attached worksheet.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Automatically delete cells based on adjacent cell color

    Formulas do not make physical changes to other cells, formulas display calculated results in the cell in which they are entered.

    To make physical changes to your original data in the cells where the data currently reside requires VBA programming. Here's a small little macro you can run that will do what you've described:

    Please Login or Register  to view this content.

    How/Where to install the macro:

    1. Open up your workbook
    2. Get into VB Editor (Press Alt+F11)
    3. Insert a new module (Insert > Module)
    4. Copy and Paste in your code (given above)
    5. Get out of VBA (Press Alt+Q)
    6. Save as a macro-enabled workbook

    The macro is installed and ready to use. Press Alt-F8 and select it from the macro list.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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. Macro delete row based on color & adjacent cell
    By Jhon Mustofa in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-29-2014, 10:09 AM
  2. [SOLVED] How to delete adjacent cells values based on one cell?
    By meprad in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-31-2013, 09:07 AM
  3. Change Font Color Based On Adjacent Cell Color
    By Zorro9758 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2013, 02:47 PM
  4. [SOLVED] Coloring Cells based on adjacent cell color
    By smugglersblues in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 01-04-2013, 09:36 PM
  5. Setting Color of Range based on adjacent cell color
    By JimE in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-02-2009, 09:04 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