Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: VB Concatenate logic

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Location
    South Bend, IN
    Posts
    996
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Need to concatenate cells from column B and C

    Trying to use this code, w/o success

    Dim Cntr
    For Cntr = 1 To ActiveSheet.UsedRange.Columns(1).Rows.Count
    Cells(Cntr, 2) = Cells(Cntr, 2) & " " & Cells(Cntr, 3)
    Next

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi
    It's working for me?

    You are running it as a procedure?
    Sub?



    Sub CellPlusCell()
    Dim Cntr
    For Cntr = 1 To ActiveSheet.UsedRange.Columns(1).Rows.Count
    Cells(Cntr, 2) = Cells(Cntr, 2) & " " & Cells(Cntr, 3)
    Next
    End Sub



    Tom

    _________________
    Found a solution? If so, please post again so members of this board can spend their time helping others. Better still, edit your topic(intitial post), by tagging on a word or phrase such as, "Problem Solved", or "Resolved". Thanks for being courteous!

    [ This Message was edited by: TsTom on 2002-05-07 08:19 ]

  3. #3
    Board Regular
    Join Date
    Apr 2002
    Location
    South Bend, IN
    Posts
    996
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I am running it as a Macro

    1) It INSERTs a column
    2) The concatenate does not show any results

  4. #4
    Board Regular
    Join Date
    Apr 2002
    Location
    South Bend, IN
    Posts
    996
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Solved problem, I am also adding and deleting columns and the referenced was incorrect

    Thanks for the help

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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