Results 1 to 6 of 6

Compare two string array and list what is not present in array 2

Threaded View

  1. #1
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Compare two string array and list what is not present in array 2

    Hi all
    Checking if cell has checkbox. I have an array of cell addresses from a range (MyArr) and I want to highlight what addresses do not have a corresponding checkbox

    I can list the addresses in the array that have a checkbox

         i = 0
            ReDim MyArr2(ActiveSheet.Shapes.Count)
            For Each cb In ActiveSheet.Shapes
                If Not IsError(Application.Match(cb.TopLeftCell.Address, MyArr, False)) Then
                MyArr2(i) = cb.TopLeftCell.Address
                i = i + 1
            End If
    but this doesn't give me the addresses that have no checkbox
         i = 0
            ReDim MyArr2(ActiveSheet.Shapes.Count)
            For Each cb In ActiveSheet.Shapes
                If IsError(Application.Match(cb.TopLeftCell.Address, MyArr, False)) Then
                MyArr2(i) = cb.TopLeftCell.Address
                i = i + 1
            End If
    any ideas??
    Last edited by nigelog; 02-27-2019 at 05:51 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Create array of items which are in List A but not present in List B
    By ImranBhatti in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2018, 01:28 AM
  2. Compare Range list with String Array list (both same # of values)
    By mgmAB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2016, 06:58 AM
  3. How to check if a string is present inside a multidimensional array
    By cgkmal in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-23-2014, 01:31 AM
  4. VBA Find Partial String in String Array and Output the Found String Array Value
    By scherich in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2014, 11:20 AM
  5. Replies: 4
    Last Post: 12-23-2013, 08:43 AM
  6. search for a part of string within an array of strings from another array list
    By jdonohue in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-12-2011, 01:32 PM
  7. Compare String array contents
    By kmlprtsngh in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-27-2010, 06:00 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