+ Reply to Thread
Results 1 to 7 of 7

Number of cells that have same values

Hybrid View

  1. #1
    David Billigmeier
    Guest

    RE: Number of cells that have same values

    Assume your Columns are A and B, and your rows go down to 20, Array enter
    this formula (CTRL+SHIFT+ENTER):

    =SUM(IF(A1:A20=B1:B20,1,0))

    Change the column and row references to fit your data.

    --
    Regards,
    Dave


    "Lingyan Hu" wrote:

    > Imagine there are two columns of cells, each row of two cells are
    > corresponding to each other. How to find out the number of rows where the two
    > corresponding cells have the same value?


  2. #2
    Lingyan Hu
    Guest

    RE: Number of cells that have same values

    Shall I push (CTRL+SHIFT+ENTER) at the same time while entering the formula?
    I tried, but it doesn't seem to work.

    "David Billigmeier" wrote:

    > Assume your Columns are A and B, and your rows go down to 20, Array enter
    > this formula (CTRL+SHIFT+ENTER):
    >
    > =SUM(IF(A1:A20=B1:B20,1,0))
    >
    > Change the column and row references to fit your data.
    >
    > --
    > Regards,
    > Dave
    >
    >
    > "Lingyan Hu" wrote:
    >
    > > Imagine there are two columns of cells, each row of two cells are
    > > corresponding to each other. How to find out the number of rows where the two
    > > corresponding cells have the same value?


  3. #3
    David Billigmeier
    Guest

    RE: Number of cells that have same values

    Type this formula in the formula bar, and instead of just pushing "Enter" to
    commit it, push CTRL+SHIFT+ENTER.

    Also, after looking at Bob's post I realize my formula isn't taking into
    account blank cells, change to the following to fix (or just use Bob's
    formula):

    =SUM(IF(((A1:A20=B1:B20)*(A1:A20<>"")*(B1:B20<>"")),1,0))

    --
    Regards,
    Dave


    "Lingyan Hu" wrote:

    > Shall I push (CTRL+SHIFT+ENTER) at the same time while entering the formula?
    > I tried, but it doesn't seem to work.
    >
    > "David Billigmeier" wrote:
    >
    > > Assume your Columns are A and B, and your rows go down to 20, Array enter
    > > this formula (CTRL+SHIFT+ENTER):
    > >
    > > =SUM(IF(A1:A20=B1:B20,1,0))
    > >
    > > Change the column and row references to fit your data.
    > >
    > > --
    > > Regards,
    > > Dave
    > >
    > >
    > > "Lingyan Hu" wrote:
    > >
    > > > Imagine there are two columns of cells, each row of two cells are
    > > > corresponding to each other. How to find out the number of rows where the two
    > > > corresponding cells have the same value?


  4. #4
    Bob Phillips
    Guest

    Re: Number of cells that have same values

    Dave,

    Your version can do away with the IF test

    =SUM(((A1:A20=B1:B20)*(A1:A20<>"")*(B1:B20<>"")))

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "David Billigmeier" <DavidBilligmeier@discussions.microsoft.com> wrote in
    message news:C1E72DAF-CD9E-4E67-A15A-9A9B251896A1@microsoft.com...
    > Type this formula in the formula bar, and instead of just pushing "Enter"

    to
    > commit it, push CTRL+SHIFT+ENTER.
    >
    > Also, after looking at Bob's post I realize my formula isn't taking into
    > account blank cells, change to the following to fix (or just use Bob's
    > formula):
    >
    > =SUM(IF(((A1:A20=B1:B20)*(A1:A20<>"")*(B1:B20<>"")),1,0))
    >
    > --
    > Regards,
    > Dave
    >
    >
    > "Lingyan Hu" wrote:
    >
    > > Shall I push (CTRL+SHIFT+ENTER) at the same time while entering the

    formula?
    > > I tried, but it doesn't seem to work.
    > >
    > > "David Billigmeier" wrote:
    > >
    > > > Assume your Columns are A and B, and your rows go down to 20, Array

    enter
    > > > this formula (CTRL+SHIFT+ENTER):
    > > >
    > > > =SUM(IF(A1:A20=B1:B20,1,0))
    > > >
    > > > Change the column and row references to fit your data.
    > > >
    > > > --
    > > > Regards,
    > > > Dave
    > > >
    > > >
    > > > "Lingyan Hu" wrote:
    > > >
    > > > > Imagine there are two columns of cells, each row of two cells are
    > > > > corresponding to each other. How to find out the number of rows

    where the two
    > > > > corresponding cells have the same value?




  5. #5
    David Billigmeier
    Guest

    Re: Number of cells that have same values

    Very true, there are many ways to word it.


    --
    Regards,
    Dave


    "Bob Phillips" wrote:

    > Dave,
    >
    > Your version can do away with the IF test
    >
    > =SUM(((A1:A20=B1:B20)*(A1:A20<>"")*(B1:B20<>"")))
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "David Billigmeier" <DavidBilligmeier@discussions.microsoft.com> wrote in
    > message news:C1E72DAF-CD9E-4E67-A15A-9A9B251896A1@microsoft.com...
    > > Type this formula in the formula bar, and instead of just pushing "Enter"

    > to
    > > commit it, push CTRL+SHIFT+ENTER.
    > >
    > > Also, after looking at Bob's post I realize my formula isn't taking into
    > > account blank cells, change to the following to fix (or just use Bob's
    > > formula):
    > >
    > > =SUM(IF(((A1:A20=B1:B20)*(A1:A20<>"")*(B1:B20<>"")),1,0))
    > >
    > > --
    > > Regards,
    > > Dave
    > >
    > >
    > > "Lingyan Hu" wrote:
    > >
    > > > Shall I push (CTRL+SHIFT+ENTER) at the same time while entering the

    > formula?
    > > > I tried, but it doesn't seem to work.
    > > >
    > > > "David Billigmeier" wrote:
    > > >
    > > > > Assume your Columns are A and B, and your rows go down to 20, Array

    > enter
    > > > > this formula (CTRL+SHIFT+ENTER):
    > > > >
    > > > > =SUM(IF(A1:A20=B1:B20,1,0))
    > > > >
    > > > > Change the column and row references to fit your data.
    > > > >
    > > > > --
    > > > > Regards,
    > > > > Dave
    > > > >
    > > > >
    > > > > "Lingyan Hu" wrote:
    > > > >
    > > > > > Imagine there are two columns of cells, each row of two cells are
    > > > > > corresponding to each other. How to find out the number of rows

    > where the two
    > > > > > corresponding cells have the same value?

    >
    >
    >


+ 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