+ Reply to Thread
Results 1 to 5 of 5

Comparing two sets of numbers

  1. #1
    Registered User
    Join Date
    01-30-2013
    Location
    spain
    MS-Off Ver
    excel 2010
    Posts
    15

    Comparing two sets of numbers

    I have two columns of 100 generated figures.

    I want every number in Column A to be compared against every number in column B (therefore there will be 100*100 pairings) i´d like to know how many times Column A´s value is higher than the value of Column B, is there a function or formula that will compute this without creating a grid.

    Thanks in advance.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Comparing two sets of numbers

    hi FoxyDread. try:
    =SUMPRODUCT(--($A$1:$A$100>$B$1:$B$100))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Comparing two sets of numbers

    @ benishiryo that will only compare cell to cell a1 to b1 a2 to b2 ..
    op says 100*100 so thats comparing a1-b1,a1-b2,a1-b3 up to a100-b99, a100-b100
    Last edited by martindwilson; 03-31-2013 at 08:44 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Comparing two sets of numbers

    @martin:
    so is that directed at me? was just wondering because of your signature.

    i suppose this array formula might help then:
    =SUM(--($A$1:$A$100>TRANSPOSE($B$1:$B$100)))
    ...confirmed by pressing CTRL-SHIFT-ENTER to activate the array. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL-SHIFT-ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

  5. #5
    Registered User
    Join Date
    01-30-2013
    Location
    spain
    MS-Off Ver
    excel 2010
    Posts
    15

    Re: Comparing two sets of numbers

    Thanks for solving this Benishiryo, and thanks for the clarification martindwilson.

+ 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