+ Reply to Thread
Results 1 to 6 of 6

Finding a pattern

  1. #1
    Registered User
    Join Date
    07-19-2013
    Location
    australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Finding a pattern

    Ive got a grid of 20x20 cells, and in there is either a 1,-1,0 or any char(such as *,#,$) and in it i need to count how many times there is a 2x2 group of the same value, I need to get this to the smallest size possible(as in all goes into one cell) otherwise just really small

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: Finding a pattern

    Hi and welcome to the forum

    by "2x2" Group", do you mean in all directions? verticle, horizontal and diagonal?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    07-19-2013
    Location
    australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Finding a pattern

    This is what i mean http://i.imgur.com/0kBU3TL.jpg thats the grid i have and each time a pattern such as the one i circled appears i count it, so yes i guess in all directions

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: Finding a pattern

    Please do not upload a picture of your file...rather, upload a sample of your workbook, showing what data you are working with, a few samples of your expected outcome is (manually entered is ok) and how you arrived at that. (exclude sensitive info). Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Finding a pattern

    How about the formula =SUMPRODUCT(--(A1:S19=B1:T19)*(A1:S19=A2:S20)*(A1:A19=B2:T20))
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  6. #6
    Registered User
    Join Date
    07-19-2013
    Location
    australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Finding a pattern

    Ahh thank you that work amazingly thank you so much

+ 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. Finding specific pattern, hiding other cells
    By andy.k in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2013, 12:50 AM
  2. Finding all occurrences of a pattern within a column
    By matcapir in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 10-05-2011, 11:16 AM
  3. Finding the pattern
    By sssss2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2009, 04:47 PM
  4. Pattern Finding in Excel
    By deepslp in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-18-2009, 06:45 PM
  5. Pattern Finding in Excel
    By deepslp in forum Excel General
    Replies: 4
    Last Post: 03-13-2009, 02:47 PM

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