+ Reply to Thread
Results 1 to 9 of 9

Clear contents of a cell based on another cell

  1. #1
    Registered User
    Join Date
    08-18-2014
    Location
    London
    MS-Off Ver
    2013
    Posts
    16

    Clear contents of a cell based on another cell

    I have a drop down list of "yes" and "no" for one of my cells. When "no" is selected i want it so the cell below is clear of its contents. At present i am using this code, though it is doing nothing:

    Please Login or Register  to view this content.
    Last edited by dd510; 09-10-2014 at 04:54 AM.

  2. #2
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Clear contents of a cell based on another cell

    Hi dd510

    Your code is a little confusing as you are saying you want to clear cell H24 based on the value of H24?

    Anyway I have changed it assuming that you are actually only concerned with H23

    Please Login or Register  to view this content.
    +++ If I helped please add reputation +++

  3. #3
    Registered User
    Join Date
    08-18-2014
    Location
    London
    MS-Off Ver
    2013
    Posts
    16

    Re: Clear contents of a cell based on another cell

    Thanks for the reply, It was meant to be H22:H23 containing the dropdown list (the cells are merged).

    With your code it is still not doing anything

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Clear contents of a cell based on another cell

    Maybe:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Clear contents of a cell based on another cell

    Are H24:H25 also merged?

    If not
    Please Login or Register  to view this content.
    if they are merged:
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    08-18-2014
    Location
    London
    MS-Off Ver
    2013
    Posts
    16

    Re: Clear contents of a cell based on another cell

    Hi Cs454,
    Yes they are merged, your code didnt work. I however tried this
    Please Login or Register  to view this content.
    With this i get an error message saying "this cannot be done to this merged cell" and refers to H24

  7. #7
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Clear contents of a cell based on another cell

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    08-18-2014
    Location
    London
    MS-Off Ver
    2013
    Posts
    16

    Re: Clear contents of a cell based on another cell

    It appears to work but then i get "Run time error '28'" "out of stack space" and then excel freezes and has to be restarted

  9. #9
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Clear contents of a cell based on another cell

    Post an example workbook. It sounds like you have a recursive procedure that is not terminating properly.

+ 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] Clear Contents in One Cell based on another value
    By basketball2524 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2014, 06:35 AM
  2. [SOLVED] Clear contents based on contents of another cell
    By Katrina DTE in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-13-2013, 02:44 PM
  3. [SOLVED] Macro - Clear cell contents based on other cell
    By 97hills in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-02-2013, 10:58 AM
  4. Macro that will clear contents of cell based on format of text in adjacent cell
    By judasdac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-12-2012, 01:56 AM
  5. Clear contents based on value in another cell
    By RochesterColonial in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2010, 12:01 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