ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Create a macro to move info from one column to another (https://www.excelbanter.com/excel-programming/329031-create-macro-move-info-one-column-another.html)

John

Create a macro to move info from one column to another
 
I have a list that has first names and middle intiials in the same column. I
want to create a macro to cut the initial and the period and paste it into
the next column over.

I have recorded a macro that does it, once. But I don't understand how to
get it to keep working through the whole list.

Thanks.
--
John

Tom Ogilvy

Create a macro to move info from one column to another
 
Columns(6).Select
' now your code

or

ActiveCell.EntireColumn.Select
' now your code

--
Regards,
Tom Ogilvy

"John" wrote in message
...
I have a list that has first names and middle intiials in the same column.

I
want to create a macro to cut the initial and the period and paste it into
the next column over.

I have recorded a macro that does it, once. But I don't understand how to
get it to keep working through the whole list.

Thanks.
--
John




bj

Create a macro to move info from one column to another
 
You need to make the macro be in a "For...Next..." or "For...While..." style.
add your recorded macro to a response and people can show you common ways of
expanding it to be more general.

"John" wrote:

I have a list that has first names and middle intiials in the same column. I
want to create a macro to cut the initial and the period and paste it into
the next column over.

I have recorded a macro that does it, once. But I don't understand how to
get it to keep working through the whole list.

Thanks.
--
John


John

Create a macro to move info from one column to another
 
Tom,

Thanks, but it's the other code that I don't think works right.

I record what I want in the A1 cell, moving to B1.

But A2---B2, etc. doesn't work.

I'd like to be able to use " *." as the find sequence.

Thanks,
--
John


"Tom Ogilvy" wrote:

Columns(6).Select
' now your code

or

ActiveCell.EntireColumn.Select
' now your code

--
Regards,
Tom Ogilvy

"John" wrote in message
...
I have a list that has first names and middle intiials in the same column.

I
want to create a macro to cut the initial and the period and paste it into
the next column over.

I have recorded a macro that does it, once. But I don't understand how to
get it to keep working through the whole list.

Thanks.
--
John





Tom Ogilvy

Create a macro to move info from one column to another
 
select the entire column and do Data=Text to Columns, selectr delimited and
in the next dialog, select space as the delimiter (assumes no first names
with embedded spaces).

This should do what you want to the entire column. to get code, turn on the
macro recorder while you do it manually.

--
Regards,
Tom Ogilvy

"John" wrote in message
...
Tom,

Thanks, but it's the other code that I don't think works right.

I record what I want in the A1 cell, moving to B1.

But A2---B2, etc. doesn't work.

I'd like to be able to use " *." as the find sequence.

Thanks,
--
John


"Tom Ogilvy" wrote:

Columns(6).Select
' now your code

or

ActiveCell.EntireColumn.Select
' now your code

--
Regards,
Tom Ogilvy

"John" wrote in message
...
I have a list that has first names and middle intiials in the same

column.
I
want to create a macro to cut the initial and the period and paste it

into
the next column over.

I have recorded a macro that does it, once. But I don't understand how

to
get it to keep working through the whole list.

Thanks.
--
John








All times are GMT +1. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com