+ Reply to Thread
Results 1 to 8 of 8

ClearContents with IF statement

  1. #1
    Registered User
    Join Date
    12-30-2005
    Posts
    45

    ClearContents with IF statement

    I have a worksheet with 15 rows (row 4 thru 19) and 4 columns (column A thru D)

    I need a macro that does the following for each row:

    If the value of D in a row = "Recorded"
    then
    ClearContents of column B, C, and D in that row


    Thanks

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: ClearContents with IF statement

    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: ClearContents with IF statement

    Try this:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    12-30-2005
    Posts
    45

    Re: ClearContents with IF statement

    Thanks you 2, worked great

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: ClearContents with IF statement

    Yet another one

    Please Login or Register  to view this content.
    Last edited by AB33; 12-28-2012 at 09:48 AM.

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: ClearContents with IF statement

    @AB33
    Please Login or Register  to view this content.
    that would clear the entire column not just the relevant row

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: ClearContents with IF statement

    @cbrd,

    you're welcome :-)

    please don't forget to mark the thread solved (click the 'thread tools' link at the top, then 'mark solved')

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: ClearContents with IF statement

    Jay,
    Thanks Jay for your correction!
    Had I seen your code before I posted it,I would have refrained from doing so, as I had ended-up with the same code as his highness.

+ 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