+ Reply to Thread
Results 1 to 9 of 9

"vba array formula to concatenate"

Hybrid View

daboho "vba array formula to... 02-13-2017, 06:36 AM
TMS Re: "vba array formula to... 02-13-2017, 07:38 AM
daboho Re: "vba array formula to... 02-13-2017, 07:54 AM
TMS Re: "vba array formula to... 02-13-2017, 08:25 AM
daboho Re: "vba array formula to... 02-13-2017, 08:27 AM
jindon Re: "vba array formula to... 02-13-2017, 08:40 AM
daboho Re: "vba array formula to... 02-13-2017, 12:02 PM
jindon Re: "vba array formula to... 02-14-2017, 10:15 PM
daboho Re: "vba array formula to... 02-18-2017, 04:19 PM
  1. #1
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    "vba array formula to concatenate"

    I have data in col a and col b
    I want concatenate all data in col a by criteria in col b, criteria in col b = "union"
    Example b2,b5,b10 = union
    Then result in d3 = (a2,b5,b10).value
    I have formula array vba
    D3 = application. Transpose(join([b:b="union",a:a,""],",")
    How i cant do use formula array like it use join

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,556

    Re: "vba array formula to concatenate"

    AFAIAA you cannot do this with a native formula, array or otherwise.

    If you Google ConcatIf, you will find a number of variations on a theme using a User Defined Function (UDF) in VBA. I suspect that is as close as you're going to get.

    It does mean that the workbook will still need to be macro enabled.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    Re: "vba array formula to concatenate"

    Yes i know but i has see by jindon post
    Its can do

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,556

    Re: "vba array formula to concatenate"

    You need to provide a link to the post to which you refer.

    If you know you can do it, what's the question?

  5. #5
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    Re: "vba array formula to concatenate"

    http://www.excelforum.com/excel-prog...-new-post.html
    In this post only range in this cell not offset cell by criteria

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: "vba array formula to concatenate"

    Sub test()
        [d3] = Join(Filter([transpose(if(b1:b1000="union",a1:a1000))], False, 0))
    End Sub

  7. #7
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    Re: "vba array formula to concatenate"

    thankyou jindon how if add criteria
    Sub test()
        [d3] = Join(Filter([transpose(if(b1:b1000="union",a1:a1000))], False, 0))
    ' and test to do function but error 
     Function test(cr As String, rng As Range) As String
          test = Join(Filter([transpose(if(rng=cr,rng.offset(,-1)))], False, 0), ",")
      End Function
    
    End Sub

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: "vba array formula to concatenate"

    Sub test()
        [d3] = VJoin(Range("a1:b1000"), 2, "union", 1)
    End Sub
    
    Function VJoin(rng As Range, CriteriaCol As Long, myStr, joinCol As Long) As String
        If Not IsNumeric(myStr) Then myStr = Chr(34) & myStr & Chr(34)
        With rng.Parent
            VJoin = Join(Filter(.Evaluate("transpose(if(" & rng.Columns(CriteriaCol).Address & "=" & _
                    myStr & "," & rng.Columns(joinCol).Address & "))"), False, 0))
        End With
    End Function

  9. #9
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    Re: "vba array formula to concatenate"

    Sorri jindon i dont see its has solved thankyou

+ 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] Concatenate Array with separated pipe" | "
    By irruzzz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-15-2014, 03:27 PM
  2. Replies: 7
    Last Post: 04-11-2013, 12:46 AM
  3. [SOLVED] Find "__"x"__" regardless of digits. The anti-concatenate....
    By esmithqg in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-02-2013, 10:42 PM
  4. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  5. Replies: 4
    Last Post: 10-29-2009, 12:08 PM
  6. Replies: 0
    Last Post: 07-17-2006, 09:45 AM
  7. If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ...
    By Maria J-son in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2006, 08:25 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