arnelgp
..forever waiting... waiting for jellybean!
- Local time
 - Today, 23:43
 
- Joined
 - May 7, 2009
 
- Messages
 - 20,681
 
change to this, then change 1 to number of spaces you want:
	
	
	
		
 
		Code:
	
	
	Public Function fnGroupBy(ByVal delimitedString As String, _
                    ByVal NumberInGroup As String, _
                    Optional ByVal delim As String = ",") As String
Dim i As Integer, j As Integer
Dim retVal As String
Dim var
var = Split(delimitedString, delim)
For i = 0 To UBound(var)
    retVal = retVal & var(i) & Space(1)     'try changing 1 to number of spaces you want
    If ((i + 1) Mod NumberInGroup) = 0 Then
        retVal = Trim$(retVal)
        retVal = retVal & vbCrLf
    End If
Next
retVal = Trim$(retVal)
fnGroupBy = retVal
End Function