Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Sandy
 
Posts: n/a
Default 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   Report Post  
Norman Jones
 
Posts: n/a
Default

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" wrote in message
...
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   Report Post  
Sandy
 
Posts: n/a
Default

Works a treat Norman.
Thank you
Sandy

"Norman Jones" wrote in message
...
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" wrote in message
...
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   Report Post  
Melissa
 
Posts: n/a
Default

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" wrote in message
...
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   Report Post  
Dave Peterson
 
Posts: n/a
Default

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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Keyboard Shortcut to move to top of column in worksheet? piddilin Excel Discussion (Misc queries) 6 April 25th 23 03:43 AM
Excel: is it possible to move column contents into a line Ginger Excel Discussion (Misc queries) 2 June 16th 05 06:59 PM
Last text value in a column 68magnolia71 Excel Worksheet Functions 1 April 19th 05 08:50 PM
How to convert columns of data to one column of text devlkat Excel Worksheet Functions 3 April 6th 05 04:08 PM
Sort or Filter option? Mcobra41 Excel Worksheet Functions 3 February 23rd 05 07:22 PM


All times are GMT +1. The time now is 04:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"