+ Reply to Thread
Results 1 to 4 of 4

Macro to clear data in certain columns if conditions exist

  1. #1
    Registered User
    Join Date
    12-13-2012
    Location
    South Dakota
    MS-Off Ver
    Excel 2010
    Posts
    4

    Macro to clear data in certain columns if conditions exist

    Greetings,

    I am trying to delete data in columns K, L and M on the attached sheet. The data needs to be deleted only if the corresponding data in the same row, column J is not present. For example, if row 10, column J is blank, then row 10, columns K, L and M need to be blank also. I know that this is some sort of if, then, else loop but I do not know exactly how to code it in VBA.

    The result should make the graphs on the side much more readable without manually going through the document to clear certain data bits. (I had to delete the graphs in the test data because the sheet was too large)
    Any help will be mightily appreciated.


    Thanks,

    JB
    Attached Files Attached Files
    Last edited by jebucher; 01-11-2013 at 06:28 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Macro to clear data in certain columns if conditions exist

    Will this do the trick for you ?
    Please Login or Register  to view this content.
    Kind regards, Harry.

  3. #3
    Registered User
    Join Date
    12-13-2012
    Location
    South Dakota
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Macro to clear data in certain columns if conditions exist

    That should work, thanks.

  4. #4
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Macro to clear data in certain columns if conditions exist

    Please don't forget to mark the thread solved.
    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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