Results 1 to 4 of 4

Thread: Unique Concatenate Range, multiple rows, Index Match Mutliple Criteria

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Junior Member
    Join Date
    Oct 2015
    Posts
    2
    Rep Power
    0
    Hello All

    I found this via google searching and have been able to modify slightly to find empty cells and duplicates.

    Code:
    ' MyConCat
    '
    ' Very simple By Apostolos Goulandris
    Function MyConCat(myDelimiter As String, Avar) As String
        
        Dim b As Variant, Dum As String
        
        If IsMissing(myDelimiter) Then myDelimiter = ""
        
        For Each b In Avar
            
            If b <> 0 Then 'ADDED THIS LINE TO ALLOW FOR BLANK CELLS
                If InStr(1, Dum, b) = 0 Then 'ADDED THIS LINE TO CHECK DUPLICATES
                    Dum = IIf(Len(b) > 0, Dum & myDelimiter & b, Dum)
                End If
            End If
        Next
        
        MyConCat = IIf(Len(myDelimiter) > 0, Mid(Dum, Len(myDelimiter) + 1, Len(Dum)), Dum)
    
    End Function

    In the previous post, i needed to concatenate 2 cells and compare against 2 column ranges, then return the concatenated unique string... example how I tried in is

    =MyConCat(",",IF(((A2:A7)&(B2:B7))=((C11)&(C12)),E 2:G7,""))

    This seemed to work fine for me. Any suggestions or improvements most welcome.

    Please acknowledge Apostolos Goulandris as he wrote the initial script
    Last edited by bakerman; 02-12-2016 at 06:31 AM. Reason: Code tags added

Similar Threads

  1. Upgrade to LookUpConcat UDF: Search Multiple Criteria and concatenate.
    By DJE in forum Excel and VBA Tips and Tricks
    Replies: 3
    Last Post: 05-23-2018, 12:18 AM
  2. Replies: 1
    Last Post: 02-13-2015, 07:30 AM
  3. Replies: 3
    Last Post: 05-23-2013, 11:17 PM
  4. Replies: 4
    Last Post: 04-24-2013, 10:04 AM
  5. Replies: 4
    Last Post: 08-11-2012, 10:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •