Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2004
    Posts
    48

    Unanswered: IF Statement Comparison in Excel spreadsheet

    I'm trying to compare cells in a spreadsheet that has 2 worksheets.

    Example: I need to compare the data in Sheet 1,rows A5:I5 with the corresponding cells in Sheet 2. If the data in both match then the result should be "Yes" and "No" if the data doesn't match.

    Any suggestions? Any help will be appreciated.

  2. #2
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    994
    Provided Answers: 2
    What you need depends on which sheet needs to show the comparison, and whether you're showing a match cell for cell, or just in total. Working on the assumption that sheet 1 needs to show the comparison, and you're working cell by cell, enter the following in A6 on sheet 1:
    Code:
    =IF(A5 = Sheet2!A5, "Yes", "No")
    Copy this across to I6.
    Then, in A7, enter this:
    Code:
    =COUNTIF(A6:I6, "Yes")
    HTH!
    10% of magic is knowing something that no-one else does. The rest is misdirection.

  3. #3
    Join Date
    Aug 2004
    Posts
    48

    IF Statement Comparison in Excel spreadsheet

    To Weejas:

    I appreciate the help. Thanks.

  4. #4
    Join Date
    Apr 2011
    Posts
    4

    In addition

    Make sure your sheet reference has quotations around it. This will protect you against errors if you have spaces in your sheet names.

    -C.W.
    Excel Statement

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •