+ Reply to Thread
Results 1 to 5 of 5

Looking for VBA code to delete rows if values in 3 specific columns are the same

  1. #1
    Registered User
    Join Date
    09-24-2012
    Location
    Tampa
    MS-Off Ver
    Excel 2010
    Posts
    10

    Looking for VBA code to delete rows if values in 3 specific columns are the same

    I have been searching through various sites and found some codes that say they do what I want but in reality it does not.

    My spreadsheet has 5 columns of data that have a varying number of rows each time it's created.
    I am trying to find a VBA code to delete the entire row(s) if the value in columns A,D, and E are the same as another row. I have had limited success and would greatly appreciate any help.

    Thanks
    Last edited by Priceman; 10-02-2012 at 10:35 AM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Looking for VBA code to delete rows if values in 3 specific columns are the same

    Priceman,

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.
    To attach a file, click the "Go Advanced" button and then click the paperclip icon to open the Manage Attachments dialog.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    09-24-2012
    Location
    Tampa
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Looking for VBA code to delete rows if values in 3 specific columns are the same

    Attached is a workbook with 2 sheets named Before Modification and Desired Result. I actually only need the code to evaluate 2 columns instead of 3. You will notice that there can be duplicates in column A due to the fact that column E has a different value.

    I hope my explanantion isn't too confusing.
    Attached Files Attached Files

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

    Re: Looking for VBA code to delete rows if values in 3 specific columns are the same

    try
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-24-2012
    Location
    Tampa
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Looking for VBA code to delete rows if values in 3 specific columns are the same

    Problem 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