+ Reply to Thread
Results 1 to 4 of 4

Using TextJoin (Excel 2016) in VBA

  1. #1
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Using TextJoin (Excel 2016) in VBA

    I tried a number of different approaches but can't seem to get this to work. ( I kept a few statements in there as comments to go back to in case there was an eureka moment.)

    I am copying unique records (relative to Head 1) from "First sheet" to "Final." Normally, I just want to copy the first instance for each cell. (Code works fine for that)
    However, if the header is "Aligned" or "Global", I want all instances to be copied to the cell.
    Here is my code and an example workbook attached. Thanks in advance.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by ChemistB; 02-21-2017 at 06:10 PM.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Using TextJoin (Excel 2016) in VBA

    Do not understand what you want.
    Can you show the expected result?
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Using TextJoin (Excel 2016) in VBA

    Okay, I modified the original file so with a sheet showing expected results.
    I know I could do it with a loop but I thought the TextJoin would be more expedient.
    Thanks

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Using TextJoin (Excel 2016) in VBA

    I would write the code like this:
    Please Login or Register  to view this content.
    It worked here

+ 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. Replies: 23
    Last Post: 01-03-2022, 10:45 AM
  2. Removing duplicates from a TEXTJOIN
    By CKPHarry in forum Excel General
    Replies: 5
    Last Post: 01-02-2020, 05:57 PM
  3. TEXTJOIN only specific words
    By thoart in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-11-2017, 07:56 AM
  4. If Match then return TEXTJOIN
    By Cynops in forum Excel General
    Replies: 1
    Last Post: 11-09-2016, 07:51 AM
  5. TEXTJOIN function
    By Tony Valko in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2016, 06:48 PM
  6. Replies: 2
    Last Post: 05-24-2016, 10:43 PM
  7. Excel 2016 & beyond!
    By jewelsharma in forum The Water Cooler
    Replies: 6
    Last Post: 01-10-2016, 05:53 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