Consulting

Results 1 to 3 of 3

Thread: Solved: Automatic concatenate

  1. #1
    VBAX Regular
    Joined
    Aug 2009
    Posts
    69
    Location

    Solved: Automatic concatenate

    Hi,

    Can anyone help me?

    I've:

    Column A defines the text to concatenate with the letter "X" appears when a blank cell stops and that's the limit. wanted him to repeat it to others. how can I do this.

    Thanks for the help

    Miguel (PT)
    Attached Files Attached Files

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Public Sub ProcessData()
    Dim Lastrow As Long
    Dim Startrow As Long
    Dim tmp As String
    Dim i As Long

    Application.ScreenUpdating = False

    With ActiveSheet

    Lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
    Startrow = 2
    For i = 2 To Lastrow + 1

    If .Cells(i, "A").Value2 <> "" Then

    tmp = tmp & .Cells(i, "B").Value2
    Else

    .Cells(Startrow, "D").Value = tmp
    tmp = ""
    Startrow = i + 1
    End If
    Next i
    End With

    Application.ScreenUpdating = True
    End Sub[/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Aug 2009
    Posts
    69
    Location
    Thanks xld

    It's working as i needed...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •