+ Reply to Thread
Results 1 to 6 of 6

Macro to compare row criteria and cut to tab

  1. #1
    Forum Contributor
    Join Date
    04-23-2009
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003 work, 2007 home
    Posts
    199

    Macro to compare row criteria and cut to tab

    Hi guys

    Am working on a macro which needs to do the below
    Data is sorted by A. Where 1 row matches the row below on Columns A, C, ABS D, H, I and J both rows should be copied to Boxes tab. Where there is only a single a/c number or both rows don't match on any 1 of the criteria- rows should remain on the Data tab.

    Appreciate any help

    Thanks

    Noel
    Attached Files Attached Files
    Last edited by somesoldiers; 06-24-2010 at 05:25 AM.

  2. #2
    Forum Contributor pierre08's Avatar
    Join Date
    02-16-2010
    Location
    Paris
    MS-Off Ver
    Excel 2003
    Posts
    166

    Re: Macro to compare row criteria and cut to tab

    Hi,
    try this:

    Please Login or Register  to view this content.
    Hope it helps

  3. #3
    Forum Contributor
    Join Date
    04-23-2009
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003 work, 2007 home
    Posts
    199

    Re: Macro to compare row criteria and cut to tab

    Thanks Piere

    am getting a syntax error for below line?

    For i = 1 To Range("A1").End(xlDown).Row Sheets("Data").Activate


    Thanks

    Noel

    Edit: my fault was th way I was copying it, let me test and let you, know, thanks again
    Last edited by somesoldiers; 06-24-2010 at 05:04 AM.

  4. #4
    Forum Contributor
    Join Date
    04-23-2009
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003 work, 2007 home
    Posts
    199

    Re: Macro to compare row criteria and cut to tab

    ok almost there, I have amended slightly to a/c for the ABS value of D- this seems to have worked. I just need to amend slightly so that both matching rows will be copied not just one, can you advise, thanks

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor pierre08's Avatar
    Join Date
    02-16-2010
    Location
    Paris
    MS-Off Ver
    Excel 2003
    Posts
    166

    Re: Macro to compare row criteria and cut to tab

    Just put this :

    Please Login or Register  to view this content.
    in steed of:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    04-23-2009
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003 work, 2007 home
    Posts
    199

    Re: Macro to compare row criteria and cut to tab

    looks good now, thanks a lot for your help Pierre

+ 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