+ Reply to Thread
Results 1 to 10 of 10

Count matches from cells

  1. #1
    Forum Contributor
    Join Date
    07-17-2020
    Location
    Uzbek
    MS-Off Ver
    Office 365, V 2212
    Posts
    198

    Count matches from cells

    Hi Experts,

    I would like to count number of matches within another last 3 cells.
    For instance, A32=186927 so have to count 1,8,6,9,2,7 from last 3 cells (A31,A30 and A29). and if any matched number is >0 then have to consider as a 1.
    I have attached sample file for easy reference please.
    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Count matches from cells

    Please add some expected results

  3. #3
    Forum Contributor
    Join Date
    07-17-2020
    Location
    Uzbek
    MS-Off Ver
    Office 365, V 2212
    Posts
    198

    Re: Count matches from cells

    I have added the attachment with outcome.
    the results in column B:E should come from column A and column G:L is just a sample to show the expected result.
    Attached Files Attached Files

  4. #4
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Count matches from cells

    Please try for I3 in F7 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and for I5 in G7 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and for MAX3 in I7 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and for MAX5 in J7 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    07-17-2020
    Location
    Uzbek
    MS-Off Ver
    Office 365, V 2212
    Posts
    198

    Re: Count matches from cells

    as expected working perfectly, thanks a lot Hans.
    But I forgot to mention one criteria,
    For example A36=213215 so can we avoid duplicates and consider like 2135.
    Something like below;
    =SUM(SIGN(IFERROR(FIND(MID(A36=2135,SEQUENCE(LEN(A36=2135)),1),CONCAT(A33:A35)),0)))

  6. #6
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Count matches from cells

    You didn't even take that into account in the example. This is easily solved for I3 and I5 by adding UNIQUE to the formula.

    The I3 formula then becomes:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Does this also apply to the MAX formula?
    If so, what exactly is the rule and expected outcome?

  7. #7
    Forum Contributor
    Join Date
    07-17-2020
    Location
    Uzbek
    MS-Off Ver
    Office 365, V 2212
    Posts
    198

    Re: Count matches from cells

    Thanks a lot Hans, working perfectly.
    No, it's not applicable to Max.

  8. #8
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Count matches from cells

    Thanks for the feedback and glad to help.
    Please considder adding reputation to the answer(s) if you think the answer(s) deserve it.

  9. #9
    Forum Contributor
    Join Date
    07-17-2020
    Location
    Uzbek
    MS-Off Ver
    Office 365, V 2212
    Posts
    198

    Re: Count matches from cells

    Usually I always add reputation, but this time am not able as the highlighted message in the attachment is appearing.
    I will definitely add whenever there is enough reputation to add
    Once again thanks Hans
    Attached Images Attached Images

  10. #10
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Count matches from cells

    Oh yes, that's from the previous tread about the gaps between the numbers.
    You may not give reputation to the same person twice in a row.

    Thank you very much anyway

+ 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. [SOLVED] Count Cells that matches text and colorindex
    By SteynfaardtD in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-30-2019, 10:43 AM
  2. [SOLVED] Count Ifs First 10 matches
    By ScabbyDog in forum Excel General
    Replies: 12
    Last Post: 03-15-2016, 06:29 AM
  3. [SOLVED] Count number of occurrences but if there are consecutive matches count them as one
    By michaljireht in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-26-2013, 08:26 PM
  4. Count row if any of a range of cells matches text
    By theorize99 in forum Excel General
    Replies: 7
    Last Post: 03-14-2012, 09:06 PM
  5. Count.If if value in other cell in the row matches
    By Dudgeon in forum Excel General
    Replies: 4
    Last Post: 08-27-2011, 04:32 PM
  6. [SOLVED] how do I count pairs of cells when each matches a condition?
    By Richard pile in forum Excel General
    Replies: 4
    Last Post: 02-20-2006, 04:00 PM
  7. COUNT INFORMATION IN COLUMN B ONLY IF A1 MATCHES K1 COUNT THAT CE.
    By witchcat98 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-04-2005, 10:06 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