+ Reply to Thread
Results 1 to 3 of 3

VBA code to highlight and select a particular pattern

  1. #1
    Registered User
    Join Date
    12-20-2018
    Location
    New Abirem, Ghana
    MS-Off Ver
    2016
    Posts
    11

    VBA code to highlight and select a particular pattern

    Can anyone help me to develop a vba code that can highlight and select a pattern in a dataset

    E.g

    No. W1 W2 W3 W4 W5
    1 3 5 20 12 43
    2 13 67 18 55 4
    3 90 78 5 1 66
    4 55 20 15 12 9
    5 1 32 67 8 29
    6 23 4 5 23 12
    7 45 34 65 12 43
    8 32 59 21 43 19
    9 67 13 73 29 15
    10 4 84 73 37 8

    With the data from cells range A2:E5000, i would like to get all the pattern I specify highlighted and selected to another workbook.

    w1 w2 w3 w4 w5
    Select Pattern: [3] [22] [13] [34] [12]
    [73] [15] [56] [49] [55]

    In this case 12 & 55 (lapping) will be highlighted from No. 1&2 in W4. Any vertical lapping in the pattern will be highlighted and selected to a workbook.


    I hope I have explained my challenge clearly.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: VBA code to highlight and select a particular pattern

    Hello ubatu05,

    Are you doing horizontal matches also?

    Will the pattern always be 2 rows of 5 numbers?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    12-20-2018
    Location
    New Abirem, Ghana
    MS-Off Ver
    2016
    Posts
    11

    Re: VBA code to highlight and select a particular pattern

    Quote Originally Posted by Leith Ross View Post
    Hello ubatu05,

    Are you doing horizontal matches also?

    Will the pattern always be 2 rows of 5 numbers?
    Yes please, two or sometimes three rows of 10 numbers maximum.

+ 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. Pattern Count VBA Code
    By jejnycta in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-06-2019, 04:42 PM
  2. rule to highlight a pattern
    By chop83 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-25-2016, 10:30 PM
  3. [SOLVED] Pattern Building VBA Code - Working code, would like to use cleaner code
    By Benisato in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-10-2015, 03:05 PM
  4. Macro to insert pattern based on value and select based on pattern
    By CB569 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-15-2015, 12:36 PM
  5. [SOLVED] highlight cells with same pattern
    By rahulsureshonline in forum Excel General
    Replies: 9
    Last Post: 12-17-2014, 12:25 AM
  6. [SOLVED] Code to delete any row not following a simple pattern
    By mlewand420 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-28-2013, 04:40 PM
  7. Replies: 1
    Last Post: 03-06-2011, 03:26 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