Be the first user to complete this post

  • 0
Add to List

VBA-Excel: Array Functions – Join() – Converts Array to String


 Join () Function returns a String that consist of array elements separated by the delimiter provided.



  • arrArrayName
    • Manda­tory
    • Type: Array
    • Array Name which needs to be converted into string.
  • delimiter
    • Optional
    • If delimiter is provided then array elements will be concatenated and separated by delimiter provided and if delimiter is not provided the array elements will be concatenated without any spaces.


Function FnArrayJoin()

  Dim arrColor

    arrColor = Array("Red", "Blue", "Green", "Yellow")    

    MsgBox Join(arrColor, "&")   

End Function

Also Read:

  1. VBA-Excel : 3D-Ranges - Working with Multiple WorkSheets At The Simultaneously
  2. VBA-Excel: String Functions – String()
  3. VBA-Excel: Date-Time Functions – IsDate()
  4. VBA Excel – Refer to Multiple Ranges : Union Method
  5. VBA-Excel: Arrays – Two Dimensional, Static Array
  6. VBA-Excel: Fill Excel Range Values in a 2D Array
  7. VBA-Excel: Date-Time Functions – DateSerial()
  8. VBA-Excel: String Functions – LTrim()