+ Reply to Thread
Results 1 to 4 of 4

MACRO to empty a range of cells based on whether specified cell is empty

  1. #1
    Registered User
    Join Date
    07-18-2012
    Location
    Markham, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    17

    MACRO to empty a range of cells based on whether specified cell is empty

    I am looking for a macro that will empty all cells and clear all formatting from columns A to E based on whether column F from the same row is empty. I do not want to delete the entire row because I have data in columns G and beyond that is not related to the the first 6 columns. This macro must start at on Row 3 because we have some headers on rows 1-2.

    I have attached a sample file that illustrates the before and after.

    Thank you in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: MACRO to empty a range of cells based on whether specified cell is empty

    try it
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-18-2012
    Location
    Markham, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: MACRO to empty a range of cells based on whether specified cell is empty

    This works great on the sample. However, let's say the columns used are A to AE, and the reference column is AF, how would the macro change. I am new to this so I appreciate your help.

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: MACRO to empty a range of cells based on whether specified cell is empty

    Please Login or Register  to view this content.

+ 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