1. #1
    Saintsfan1977
    Saintsfan1977's Avatar Become A Pro!
    Join Date: 01-10-11
    Posts: 146
    Betpoints: 4104

    Excel Formula for Difference

    Can anybody please help me with this formula? I have numbers in column A1-A5 and B1-B5. I would like to be able to count how many times the difference between cells in A & B are 4 or greater.

    For example
    A1=10 B1=14
    A2=7 B2=3
    A3=6 B3=9
    A4=20 B4=21
    A5= 30 B5=27

    As you can see the count would be 1 since 7-4 in cells A2 and B2=4. I can't figure out the formula without using column C to be a true or false. I have numbers in columns C,D,E,F also so I just want to use the formula in pairs.

    Thanks

  2. #2
    brewers7
    brewers7's Avatar Become A Pro!
    Join Date: 03-11-06
    Posts: 298
    Betpoints: 4441

    See if the attached file helps...
    Attached Files

  3. #3
    Optional
    Optional's Avatar Moderator
    Join Date: 06-10-10
    Posts: 57,803
    Betpoints: 9204

    in G1

    IF(A1-B1>3,1,IF(B1-A1>3,1,0))

    Then to get your tally put COUNT(G:G) in any cell.

  4. #4
    Saintsfan1977
    Saintsfan1977's Avatar Become A Pro!
    Join Date: 01-10-11
    Posts: 146
    Betpoints: 4104

    Thanks guys. I figured there might be a way to calculate it all in one cell instead of having to use say Column G to sum all the values but this will work. I appreciate it.

Top