Results 1 to 29 of 29

Concatenate and ignore blanks

Threaded View

  1. #1
    Registered User
    Join Date
    09-16-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    38

    Concatenate and ignore blanks

    Hi Guys,

    I'd like to concatenate two columns but ignore blanks.

    I've attached the file that I'm working with.

    I'd the format to be as shown in the sheet.

    This is the code i've got in a module at the mo:

    Function MilestoneDate(rngMilestones As Range, rngDates As Range, strDelim As String) As String
    Dim rngCell As Range
    Dim lngROff As Long, lngCOff As Long
    lngROff = rngDates.Row - rngMilestones.Row
    lngCOff = rngDates.Column - rngMilestones.Column
    On Error Resume Next
    For Each rngCell In rngNames.Cells
        If rngCell.Value <> "" Then MilestoneDate = MilestoneDate & strDelim & rngCell.Value & " (" & rngCell.Offset(lngROff, lngCOff) & ")"
    Next rngCell
    On Error GoTo 0
    Milestone = Replace(MilestoneDate, strDelim, "", 1, 1)
    End Function
    I've got a cell with "=MILESTONEDATE(D9:D23,E9:E23,", ")

    But nothing seems to happen.

    Any ideas?
    Attached Files Attached Files
    Last edited by NBVC; 09-24-2009 at 02:30 PM.

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