+ Reply to Thread
Results 1 to 2 of 2

How to use "CONCATENATE" function in VBA

  1. #1

    How to use "CONCATENATE" function in VBA

    Hello
    How can I do something like this I want to add to all cells in range
    Range("A:A").SpecialCells(xlCellTypeConstants) a prefix string like UT_
    for example. I know there is a "character" but how i can use it for ma
    Range
    ____A_____B____
    1 | UT_string | |
    2 | UT_string | |
    3 | UT_string | |
    4 | UT_string | |
    ...........................
    40| UT_string | |
    41| | |
    Thanks for response


  2. #2
    Gary Keramidas
    Guest

    Re: How to use "CONCATENATE" function in VBA

    if i understand correctly, maybe something like this

    Sub addtext()
    Dim lastrow As Long
    Dim cell As Range
    Dim rng As Range
    lastrow = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
    Set rng = Range("A1:A" & lastrow)
    For Each cell In rng.Cells
    cell.Value = "UT_" & cell.Value
    Next cell
    End Sub

    --


    Gary


    <[email protected]> wrote in message
    news:[email protected]...
    > Hello
    > How can I do something like this I want to add to all cells in range
    > Range("A:A").SpecialCells(xlCellTypeConstants) a prefix string like UT_
    > for example. I know there is a "character" but how i can use it for ma
    > Range
    > ____A_____B____
    > 1 | UT_string | |
    > 2 | UT_string | |
    > 3 | UT_string | |
    > 4 | UT_string | |
    > ..........................
    > 40| UT_string | |
    > 41| | |
    > Thanks for response
    >




+ 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