+ Reply to Thread
Results 1 to 4 of 4

Compare rows

  1. #1
    Registered User
    Join Date
    09-11-2009
    Location
    ludvika
    MS-Off Ver
    Excel 2003
    Posts
    28

    Compare rows

    Is there any simple way to compare rows, like this maybe ?
    Please Login or Register  to view this content.
    Or do i have to loop thru all cells and compare them for both rows ?

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Compare rows

    You could use Evaluate to conduct a calculation, ie

    Please Login or Register  to view this content.
    It's not really clear what your end goal is but the above is meant purely as an illustration of a potential approach (avoiding iteration)

  3. #3
    Registered User
    Join Date
    09-11-2009
    Location
    ludvika
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Compare rows

    I have a macro that merge different files into one, the problem is that i get alot of duplicate rows. So i thought the easiest way to get rid of them is to sort the list by the ID column and then compare row i with i-1 with a loop, if they are the same delete them. The problem is that i can't compare the rows.

    I don't fully understand the code you gave me but i will try it and see if i can figure out how to use it with my problem. Does it work with names and stuff as data, or only with numbers ?
    Last edited by DonkeyOte; 11-27-2009 at 07:20 AM. Reason: removed unnec. quote

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Compare rows

    This is a pretty big change from the initial question... and in truth the requirements remain vague - are you testing combination of A & B ?

    Assuming the data was sorted as implied and that you are looking for combinations of A & B then you could use something like:

    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