+ Reply to Thread
Results 1 to 6 of 6

Needing VBA code to clear contents of cell when the contents of another cell is cleared

  1. #1
    Registered User
    Join Date
    03-02-2012
    Location
    Texas
    MS-Off Ver
    Excel 2013
    Posts
    12

    Needing VBA code to clear contents of cell when the contents of another cell is cleared

    Below is the code I am working with.

    What I an trying to do now is clear the contents of columns 8 and 9 when the contents of column 7 are cleared.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,077

    Re: Needing VBA code to clear contents of cell when the contents of another cell is cleare

    Hello jeh0714,

    It appears that you may have one or more Named Ranges in your Workbook, which makes a ready solution a bit of guessing in tweaking your Code.

    Please try the Code below-(Untested):

    Please Login or Register  to view this content.
    If this does not work for you then please, attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Registered User
    Join Date
    03-02-2012
    Location
    Texas
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: Needing VBA code to clear contents of cell when the contents of another cell is cleare

    Sir, Thank you for the attempt, unfortunately it did not work. I have attached a sample workbook per your request.
    Thank you in advance for your assistance.
    Attached Files Attached Files

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,077

    Re: Needing VBA code to clear contents of cell when the contents of another cell is cleare

    Thank you for your response jeh0714,

    Here is your Revised Code;

    Please Login or Register  to view this content.
    It works just fine in the sample Workbook attached below.

    Regards.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-02-2012
    Location
    Texas
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: Needing VBA code to clear contents of cell when the contents of another cell is cleare

    Sir,

    Thank you, this is exactly what I was looking for and it works as expected

    James
    Last edited by jeh0714; 12-15-2016 at 03:45 PM.

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,077

    Re: Needing VBA code to clear contents of cell when the contents of another cell is cleare

    Hi jeh0714,

    You are welcome, glad I could help. Thank you for marking this Thread as "Solved", and also for adding to my Reputation.

    It is much appreciated!

    Regards.

+ 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] Code to clear cell contents
    By Nitefox in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 12-15-2013, 10:29 PM
  2. Code to clear contents of a cell based on specific criteria
    By srsev in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-21-2013, 01:38 PM
  3. [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
  4. VBA code to clear the contents (or value) of a cell without clearing the formula
    By BazzaBit in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-10-2013, 08:16 PM
  5. [SOLVED] How to remove date in one cell when another cell's contents are cleared.
    By jm263 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2013, 08:22 PM
  6. [SOLVED] VBA code to automatically clear a cells contents when another cell is empty
    By masso1980 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-25-2012, 10:52 PM
  7. how to delete contents of 2 adj cells when one cell is changed or cleared
    By larryoslund in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-20-2012, 02:20 PM
  8. vba code to clear contents of cell
    By codesRus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-16-2012, 12:16 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