Count Rows on condition

Ian3 66 Reputation points
2020-10-07T17:19:16.637+00:00

I have sample columns below and need to count rows if Column A is not equal to Column B, which should be 3
Is it possible to do it without extra column calculation?

A B
22 33
11 11
33 44
55 55
23 45

Microsoft 365 and Office | Excel | For business | Windows
{count} votes

2 answers

Sort by: Most helpful
  1. Emi Zhang-MSFT 30,046 Reputation points Microsoft External Staff
    2020-10-08T08:00:20.423+00:00

    Hi @Ian3 ,
    Please try this formula:

    =SUM(N(A2:A6<>B2:B6))  
    

    30855-235.png
    Hope it's helpful.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. Nobuko Ichimaru 316 Reputation points
    2020-10-09T10:41:12.04+00:00

    hi! @Ian3
    "without extra column"
    how about, calculation "with extra file"

    download simple package "CountRows floder"
    https://1drv.ms/u/s!At950JyIeN6wgehsN1ncxmI9NmflGw?e=iTIfhG

    2files, they belong same folder(same directory).
    open 2 files
    ・CountRowsE.xlsx
    ・CREM.xlsm

    then click button "Click and Count"
    The result is displayed.

    CountRowsE.xlsx = (Counting) Data, Columns("A:B")
    CREM.xlsm = Display of counting results

    Close without saving if you do not need to change
    Hope it's helpful

    @Emi Zhang-MSFT
    Your answer was helpful
    good calcuiation
    thank you


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.