+ Reply to Thread
Results 1 to 10 of 10

Formula for comparing rows

  1. #1
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    MS 365 Subscription
    Posts
    369

    Formula for comparing rows

    Hi,

    I need help with a formula for comparing rows in same colums.
    Samplefile attached.

    Any help will be much appreciated.

    Oeysbrei
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula for comparing rows

    Hi,

    Perhaps a more elegant formula for column L would be

    =SUMPRODUCT((A2:J2)*COLUMN(A2:J2))

    then alongside in M2 copied down
    =COUNTIF($M$2:$M$32,M2)

    Then filter column M for values > 1 to see duplicates
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    MS 365 Subscription
    Posts
    369

    Re: Formula for comparing rows

    Hi,

    I´ve tested youre formula, but couldent make it work
    I´ve attached a new samplefile, so if you have time, I would be a happy man if you could arrange it for me to study
    I also forgot saying that I need to know the possition of matching rows

    Thanks for youre help so far

    Best regards
    Oeysbrei
    Attached Files Attached Files
    Last edited by Oeysbrei; 04-19-2012 at 06:48 PM.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula for comparing rows

    Sorry, that should have read

    =COUNTIF($L$2:$L$32,L2)

    in M2

  5. #5
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    MS 365 Subscription
    Posts
    369

    Re: Formula for comparing rows

    Richard Buttrey,

    I made it work, but it doesent tell the position of matching rows.
    I need to know that because I will have up to 60 000 rows where i´m gonna use it.

    Oeysbrei

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula for comparing rows

    Hi,

    You can tell the position by filtering column M for values > 1 and then marking them.

    Regards

  7. #7
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    MS 365 Subscription
    Posts
    369

    Re: Formula for comparing rows

    Richard Buttrey,

    appreciate your help, but I'm an amateur at excel, and do not know how to do this

    hope you have patience with me

    Oeysbrei

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula for comparing rows

    See attached which is already filtered with 'Data-->Filter' then choose the criteria i.e. >1
    Attached Files Attached Files

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula for comparing rows

    ....
    Also just realised that with some combinations the original sumproduct would produce the same total but with different column values
    For example
    2 4 2 1 1 1 1 1 1 1
    produces the same total as
    2 1 4 1 1 1 1 1 1 1

    A better sumproduct formula in L2 would be

    =SUMPRODUCT((A2:J2)*COLUMN(A2:J2)*SUM(A2:J2))

  10. #10
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    MS 365 Subscription
    Posts
    369

    Re: Formula for comparing rows

    Thank you,

    I would never figured it out if it wasent for you, but now it is solved.
    I will proberbly need help someday soon, so i´m glad there are people like you on this forum

    Best regards
    Oeysbrei

+ 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