+ Reply to Thread
Results 1 to 5 of 5

Move text from column B to column A

  1. #1
    Sandy
    Guest

    Move text from column B to column A

    I am trying to move text from column B to in front of that in column A.
    A B
    Jones John

    Result would be
    A B
    John Jones
    Tried this:
    Private Sub NameChange()
    For Each c In Selection
    c.Text = c.Offset(0, 1).Text & " " & c.Text
    Next c
    End Sub

    Am I even close (sorry I'm new to this stuff)
    Sandy



  2. #2
    Norman Jones
    Guest

    Re: Move text from column B to column A

    Hi Sandy,

    Try this small modification:

    Private Sub NameChange()
    Dim c As Range
    For Each c In Selection
    c.Value = c.Offset(0, 1).Value & " " & c.Value
    Next c
    End Sub


    ---
    Regards,
    Norman



    "Sandy" <[email protected]> wrote in message
    news:%[email protected]...
    >I am trying to move text from column B to in front of that in column A.
    > A B
    > Jones John
    >
    > Result would be
    > A B
    > John Jones
    > Tried this:
    > Private Sub NameChange()
    > For Each c In Selection
    > c.Text = c.Offset(0, 1).Text & " " & c.Text
    > Next c
    > End Sub
    >
    > Am I even close (sorry I'm new to this stuff)
    > Sandy
    >




  3. #3
    Sandy
    Guest

    Re: Move text from column B to column A

    Works a treat Norman.
    Thank you
    Sandy

    "Norman Jones" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Sandy,
    >
    > Try this small modification:
    >
    > Private Sub NameChange()
    > Dim c As Range
    > For Each c In Selection
    > c.Value = c.Offset(0, 1).Value & " " & c.Value
    > Next c
    > End Sub
    >
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "Sandy" <[email protected]> wrote in message
    > news:%[email protected]...
    >>I am trying to move text from column B to in front of that in column A.
    >> A B
    >> Jones John
    >>
    >> Result would be
    >> A B
    >> John Jones
    >> Tried this:
    >> Private Sub NameChange()
    >> For Each c In Selection
    >> c.Text = c.Offset(0, 1).Text & " " & c.Text
    >> Next c
    >> End Sub
    >>
    >> Am I even close (sorry I'm new to this stuff)
    >> Sandy
    >>

    >
    >




  4. #4
    Melissa
    Guest

    Re: Move text from column B to column A

    Is there a way to move an entire column to in-between existing columns
    without getting the error message, "Do you want to replace contents in
    destination cells?" and also without VB? I'm no use with coding...

    What I've been doing is to insert new blank column, highlight and drag one
    of my existing column to this new column, then delete the old column.

    "Norman Jones" wrote:

    > Hi Sandy,
    >
    > Try this small modification:
    >
    > Private Sub NameChange()
    > Dim c As Range
    > For Each c In Selection
    > c.Value = c.Offset(0, 1).Value & " " & c.Value
    > Next c
    > End Sub
    >
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "Sandy" <[email protected]> wrote in message
    > news:%[email protected]...
    > >I am trying to move text from column B to in front of that in column A.
    > > A B
    > > Jones John
    > >
    > > Result would be
    > > A B
    > > John Jones
    > > Tried this:
    > > Private Sub NameChange()
    > > For Each c In Selection
    > > c.Text = c.Offset(0, 1).Text & " " & c.Text
    > > Next c
    > > End Sub
    > >
    > > Am I even close (sorry I'm new to this stuff)
    > > Sandy
    > >

    >
    >
    >


  5. #5
    Dave Peterson
    Guest

    Re: Move text from column B to column A

    If you select the column
    rightclick anywhere on that selection
    choose Cut

    The select a different column
    rightclick on that one
    and choose "insert cut cells"

    You won't get a prompt--at least I don't.

    You can also:
    select the column
    rightclick and drag on the selection border
    and release it when you get to its new location
    You'll see a list of options.
    Choose "shift right and move"

    you can also:
    select the column
    shift-click the selection border and drag to its new location

    I didn't get a prompt when I did any of these.)

    Melissa wrote:
    >
    > Is there a way to move an entire column to in-between existing columns
    > without getting the error message, "Do you want to replace contents in
    > destination cells?" and also without VB? I'm no use with coding...
    >
    > What I've been doing is to insert new blank column, highlight and drag one
    > of my existing column to this new column, then delete the old column.
    >
    > "Norman Jones" wrote:
    >
    > > Hi Sandy,
    > >
    > > Try this small modification:
    > >
    > > Private Sub NameChange()
    > > Dim c As Range
    > > For Each c In Selection
    > > c.Value = c.Offset(0, 1).Value & " " & c.Value
    > > Next c
    > > End Sub
    > >
    > >
    > > ---
    > > Regards,
    > > Norman
    > >
    > >
    > >
    > > "Sandy" <[email protected]> wrote in message
    > > news:%[email protected]...
    > > >I am trying to move text from column B to in front of that in column A.
    > > > A B
    > > > Jones John
    > > >
    > > > Result would be
    > > > A B
    > > > John Jones
    > > > Tried this:
    > > > Private Sub NameChange()
    > > > For Each c In Selection
    > > > c.Text = c.Offset(0, 1).Text & " " & c.Text
    > > > Next c
    > > > End Sub
    > > >
    > > > Am I even close (sorry I'm new to this stuff)
    > > > Sandy
    > > >

    > >
    > >
    > >


    --

    Dave Peterson

+ 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