+ Reply to Thread
Results 1 to 7 of 7

Delete row if value in column C found

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Exclamation Delete row if value in column C found

    Hi guys

    Im hoping someone can give me a quick fix to solve this rather silly stumbling block if mine. I have a macro that I want to modify to Delete the entire row if column C is either = cncl,postalert,merged or alternatively to delete row if value in comlumn C is not equal to Acct. This is the last hurdle in one of my macros I would appreciate any help.

    Thanks

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Delete row if value in column C found

    Hi guvner,

    I need a clue as to how you're addressing the ranges.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Delete row if value in column C found

    column C is either = cncl,postalert,merged or alternatively to delete row if value in comlumn C is not equal to Acct
    Do you mean column C will contain text like "cncl", "postalert","merged" ?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Registered User
    Join Date
    08-21-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Delete row if value in column C found

    Yes thats what I meant, apologies for not stating that clearly

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Delete row if value in column C found

    Try this code
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose Tools | Macro | Macros
    Select a macro in the list, and click the Run button

  6. #6
    Registered User
    Join Date
    08-21-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Delete row if value in column C found

    The macro works but I wanted to add it to my personal.xls file so its always in the background. could you edit it?

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Delete row if value in column C found

    You do not need to edit the macro. But if you already have a personal.xls file, just add the macro to the module.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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