+ Reply to Thread
Results 1 to 5 of 5

Clear Content if cell isempty

  1. #1
    Forum Contributor
    Join Date
    06-01-2017
    Location
    Santos
    MS-Off Ver
    Office 2016 - Windows 7
    Posts
    105

    Clear Content if cell isempty

    Dears

    May I ask you how to code the following request in VBA.

    If my cell in column D is empty/blank then clear content in column F.

    Example :
    Through a loop, check all cells in column D.
    If D1 is empty then clear content F1, etc etc

    Tried several things but nothing worked.

    Hope you can help me
    Regards
    Last edited by ozstrik3r69; 08-22-2018 at 02:58 PM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Clear Content if cell isempty

    This macro assumes you have headers in row 1 and your data starts in row 2.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Clear Content if cell isempty

    How about
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    06-01-2017
    Location
    Santos
    MS-Off Ver
    Office 2016 - Windows 7
    Posts
    105

    Re: Clear Content if cell isempty

    Mumps1 & Fluff13 thank you for your help.

    I used the one from Fluff13 because initially I wrote the same code but with a mistake.
    And I really think that it is the best for me at this moment
    See below what I had

    Please Login or Register  to view this content.
    Once again, thanks for your help folks
    Regards

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Clear Content if cell isempty

    Glad we could help & thanks for the feedback

+ 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. Clear Content When a cell value = 0
    By Captain Hook in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2017, 01:06 PM
  2. [SOLVED] Clear content referencing another cell's same content
    By papusale in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-08-2015, 05:21 AM
  3. [SOLVED] Clear Content if cell in a range contain #N/A VBA
    By alex_shin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-16-2014, 06:33 PM
  4. How to clear cell's content?
    By NZL in forum Excel General
    Replies: 3
    Last Post: 03-09-2013, 10:04 AM
  5. Clear Cell Content Query
    By captedgar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-23-2010, 06:25 AM
  6. Deleting cell no value by clear Content
    By pichai in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-24-2008, 07:53 AM
  7. Clear content of cell if has some character.
    By Krzys in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-23-2007, 09:20 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