+ Reply to Thread
Results 1 to 8 of 8

Adding a count to concatenate range function

Hybrid View

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

    Re: Adding a count to concatenate range function

    Thanks for the code tag and I hope you can edit your first post as well.

    Here's an idea
    Function ConcatenateRange(ByVal cell_range As Range, _
                    Optional ByVal separator As String = " ") As String
        Dim e, n As Long
        For Each e In cell_range.Value
            If e <> "" Then
                n = n + 1
                ConcatenateRange = ConcatenateRange & separator & n & ") " & e
            End If
        Next
        If Len(ConcatenateRange) Then ConcatenateRange = Mid$(ConcatenateRange, Len(separator) + 1)
    End Function

  2. #2
    Registered User
    Join Date
    02-11-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Adding a count to concatenate range function

    Jindon, you are a life saver. It works perfectly thank you! +rep!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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