+ Reply to Thread
Results 1 to 3 of 3

Macro to add text in Cell (in a range of Row)

  1. #1
    Registered User
    Join Date
    09-16-2005
    Posts
    32

    Macro to add text in Cell (in a range of Row)

    Hello,
    in sheet1, I would like to add text in cells in Column C from a range of row (by FirstRow to LastRow.

    In Cell C11 to C?? (LastRow) i would like to add "U-".
    does anyone could help me to perform this ?
    Thanks in advance.
    Herve

  2. #2
    Norman Jones
    Guest

    Re: Macro to add text in Cell (in a range of Row)

    Hi Herve,

    I assume that your intention is to add "U-" as a prefix to existing text.

    Try:
    '============>>
    Public Sub Tester()
    Dim LCell As Range
    Dim rng As Range
    Dim rCell As Range

    Set LCell = Cells(Rows.Count, "C").End(xlUp)
    Set rng = Range("C11", LCell)

    For Each rCell In rng.Cells
    rCell.Value = "U-" & rCell.Value
    Next rCell
    End Sub
    '<<============

    ---
    Regards,
    Norman



    "herve" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hello,
    > in sheet1, I would like to add text in cells in Column C from a range
    > of row (by FirstRow to LastRow.
    >
    > In Cell C11 to C?? (LastRow) i would like to add "U-".
    > does anyone could help me to perform this ?
    > Thanks in advance.
    > Herve
    >
    >
    > --
    > herve
    > ------------------------------------------------------------------------
    > herve's Profile:
    > http://www.excelforum.com/member.php...o&userid=27314
    > View this thread: http://www.excelforum.com/showthread...hreadid=474046
    >




  3. #3
    Registered User
    Join Date
    09-16-2005
    Posts
    32
    Cheers Norman

+ 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