Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

Comparing values across columns - checking row values against each other

Latest post Sun, Mar 7 2010 11:30 PM by robot1. 2 replies.
  • Tue, Mar 2 2010 1:43 PM

    Comparing values across columns - checking row values against each other

     

    I want to compare each row, if col A is bigger than col B then alert me with a message.  I am thinking a count of sorts - but cant quite get the logic to work.

    Any ideas?!

     

     

    Hi all, 

     

    I am trying to have a formula that will check if any row value across two different column is bigger that the other then return a msg.

     

    ie.

    COL A COL B
    ROW 1 43 145
    ROW 2 42 145
    ROW 3 41 145
    ROW 4 40 30
    ROW 5 39 145
    ROW 6 37 145
    ROW 7 36 145
    ROW 8 35 145


    • Post Points: 37
  • Tue, Mar 2 2010 2:26 PM In reply to

    Re: Comparing values across columns - checking row values against each other

    Is this what you mean?

     

    =SUMPRODUCT(--(A2:A20>B2:B20))>0

    Regards

    Bob

    • Post Points: 5
  • Sun, Mar 7 2010 11:30 PM In reply to

    • robot1
    • Not Ranked
    • Joined on Mon, Mar 8 2010
    • Posts 1
    • Points 5

    Re: Comparing values across columns - checking row values against each other

    If I understand this correctly couldn't you use conditional formatting and just do a compare between the two columns?  If there is a difference, then highlight the cell.

    = $A1 > $B1

    • Post Points: 5
Page 1 of 1 (3 items) | RSS
Copyright Excel User Group and the relevant contributors, 2009. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.