+ Reply to Thread
Results 1 to 25 of 25

Textjoin?

  1. #1
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Textjoin?

    I've been trying to understand how to use textjoin to make this work but I think I need some help.

    I want to join all cells in sheets("race").range("AO2:AQ17) to a single cell. So that the output would look the same as the range but within a single cell and with spaces as a delimiter.

    This is what the range looks like:
    2017-08-19 09_28_57-Javelin.xlsm - Excel.png

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Textjoin?

    Good morning johandenver

    You can use Concatenate or the & operand, thus :
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    HTH

    DominicB

  3. #3
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Textjoin?

    Thanks, I forgot to mention that I need to do it in vba. How would I use concatenate then?

  4. #4
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Textjoin?

    Something like this?
    Please Login or Register  to view this content.
    Kind regards, Harry.

  5. #5
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Textjoin?

    Thanks :-)

    I'm afraid I don't really understand how to put the result into another cell, do I refer to hsv_1 as a variable?

  6. #6
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Textjoin?

    No,

    Press Alt+F11
    Insert → Modul.
    Paste the code in the white area.
    Press Alt+F11.
    Run the code with Alt+F8 → Run.

  7. #7
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Textjoin?

    Ok, the thing is that I need to put the concatenated result in a textbox with something like this:

    ActiveSheet.Shapes("ScoreBoard").TextFrame.Characters.Text = concatenatednames

    So I'm guessing I need to get the result into either a variable or another cell first?

  8. #8
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Textjoin?

    Then try these.
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Textjoin?

    That worked perfectly, thanks a lot! :-)

  10. #10
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Textjoin?

    I ran into a problem with this when using different number formats.

    When I use this format (mm:ss,00)
    2017-09-05 22_22_56-Clipboard.png

    The result becomes this:
    2017-09-05 22_23_33-800m.xlsm - Excel.png

    It seems that my shape does not understand the number format I'm using.
    Is there any way to use the same code but keep the number format?

  11. #11
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Textjoin?

    To clarify, I'd like the result to be this instead:
    2017-09-06 11_01_11-800m.xlsm - Excel.png

  12. #12
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Textjoin?

    Here's an example of my problem
    Attached Files Attached Files

  13. #13
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Textjoin?

    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Textjoin?

    Thanks :-)

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

    Re: Textjoin?

    Simply
    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Textjoin?

    Sorry, I'm back again with another format. This time I got problems with [m]:ss.00

    How would I adapt HSV's or Jindon's code for this format?

  17. #17
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Textjoin?

    Sorry, I'm back with another format. This time it's [m]:ss.00 that's causing problems.

    How would I adapt HSV's or jindon's code for this format?

  18. #18
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Textjoin?

    Sorry, I just realized that it's basically the same format as last time.

    jindon's code worked very well. I couldn't get HSV's latest code to work (it gives me uncompatible types error)
    However jindon's example requires all cells to be visible and I can't have them visible. They need to be hidden. Can I adapt the code to work with hidden cells as well?
    Last edited by johandenver; 09-27-2017 at 03:44 PM.

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

    Re: Textjoin?

    How are you hiding?

    It is working regardless of row.hidden status.
    Attached Files Attached Files
    Last edited by jindon; 09-27-2017 at 08:39 PM.

  20. #20
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Textjoin?

    It works when hiding rows but not when hiding columns, for some reason. I need to be able to hide the columns unfortunately.

  21. #21
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Textjoin?

    With hiding columns.


    Please Login or Register  to view this content.

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

    Re: Textjoin?

    OK then
    Please Login or Register  to view this content.

  23. #23
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Textjoin?

    Lots of thanks to the both of you, you guys are awesome. It worked perfectly.

  24. #24
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Textjoin?

    Just as an alternative
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  25. #25
    Registered User
    Join Date
    10-23-2008
    Location
    Sweden
    Posts
    92

    Re: Textjoin?

    Hi again,

    Is it possible to get the joined text to pick up previous formats as well?
    (some of the text joined was previously bold but is not bold when joined together)

+ 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. Removing duplicates from a TEXTJOIN
    By CKPHarry in forum Excel General
    Replies: 5
    Last Post: 01-02-2020, 05:57 PM
  2. TEXTJOIN change the last delimiter into "&"
    By atearth in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-19-2017, 10:28 AM
  3. TextJoin in a table doesn't seem to work
    By Bearco in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-31-2017, 12:13 AM
  4. Using TextJoin (Excel 2016) in VBA
    By ChemistB in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-21-2017, 06:52 PM
  5. TEXTJOIN only specific words
    By thoart in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-11-2017, 07:56 AM
  6. If Match then return TEXTJOIN
    By Cynops in forum Excel General
    Replies: 1
    Last Post: 11-09-2016, 07:51 AM
  7. TEXTJOIN function
    By Tony Valko in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2016, 06:48 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