+ Reply to Thread
Results 1 to 3 of 3

Counting the number of matching cells

  1. #1
    Forum Contributor
    Join Date
    11-03-2012
    Location
    Nottingham, UK
    MS-Off Ver
    Office 365
    Posts
    127

    Counting the number of matching cells

    Hi - I am trying to count the number cells that match other cells in a range. If you look at the attached file, I enter a number in column E each week. If that number matches any of the six numbers in columns I to N (for each row), the cell is formatted in yellow background. What I would like to do is put a formula in column R that counts the number of matching cells (min 0, max 6) e.g. Row 3 would contain 1, Row 2 contains 2, Row 3 contains 1 etc.

    It would probably be something like =countif(=MATCH(I3,$E$2:$E$42,0)) but I can't get the syntax correctly

    Out of interest, it is a Lottery bonus ball accumulator syndicate (UK)

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Counting the number of matching cells

    try in r3 filled down
    =SUM(--(I3:N3=$E$5:$E$31)) array entered with ctrl+shift+enter
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Contributor
    Join Date
    11-03-2012
    Location
    Nottingham, UK
    MS-Off Ver
    Office 365
    Posts
    127

    Re: Counting the number of matching cells

    Excellent! Thank you Martin

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 06-08-2013, 01:52 PM
  2. [SOLVED] Counting only first occurance with two matching cells
    By Christopherdj in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-08-2013, 02:36 AM
  3. Replies: 5
    Last Post: 12-31-2011, 06:10 AM
  4. Counting the Number of Dates with Matching Month Criteria
    By zom in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-17-2008, 07:47 PM
  5. Counting the Number of Dates with Matching Month Criteria
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-25-2005, 05:50 AM

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