ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Moving text (https://www.excelbanter.com/excel-discussion-misc-queries/206173-moving-text.html)

Lacey1941

Moving text
 
I have a rather long list of names and some of them have a space at the
beginning while others don't.

Is there a way to move whole groups of names over one space or will I have
to move them manually one name at a time?

Ross

Moving text
 
Question-Are they single names such as Mary or John, or are they combined as
in Mary Smith or John Doe?
--
smither fan


"Lacey1941" wrote:

I have a rather long list of names and some of them have a space at the
beginning while others don't.

Is there a way to move whole groups of names over one space or will I have
to move them manually one name at a time?


David Biddulph[_2_]

Moving text
 
=IF(LEFT(A2)=" ",RIGHT(A2,LEN(A2)-1),A2)
--
David Biddulph

"Lacey1941" wrote in message
...
I have a rather long list of names and some of them have a space at the
beginning while others don't.

Is there a way to move whole groups of names over one space or will I have
to move them manually one name at a time?




Lacey1941

Moving text
 
Single names

"Ross" wrote:

Question-Are they single names such as Mary or John, or are they combined as
in Mary Smith or John Doe?
--
smither fan


"Lacey1941" wrote:

I have a rather long list of names and some of them have a space at the
beginning while others don't.

Is there a way to move whole groups of names over one space or will I have
to move them manually one name at a time?


Dave Peterson

Moving text
 
If there are no internal spaces in the data in that list, then maybe you can
just:

select that range
edit|replace
what: (spacebar)
with: (leave blank)
replace all

If there are internal spaces in the data in that list, you could:

Insert a new column (to its right?)
and use a formula like:
=trim(a1)
to remove all leading and all trailing space characters. It'll also convert
multiple internal space characters to a single space.

Then you could drag this formula down the column.
Select the column
Edit|copy
and then select the original column
Edit|paste special|values

and delete that helper column that holds the formula.

Lacey1941 wrote:

I have a rather long list of names and some of them have a space at the
beginning while others don't.

Is there a way to move whole groups of names over one space or will I have
to move them manually one name at a time?


--

Dave Peterson

Lacey1941

Moving text
 
Surnames are in column A and given name is in column B. It's the given names
I want to move.

"David Biddulph" wrote:

=IF(LEFT(A2)=" ",RIGHT(A2,LEN(A2)-1),A2)
--
David Biddulph

"Lacey1941" wrote in message
...
I have a rather long list of names and some of them have a space at the
beginning while others don't.

Is there a way to move whole groups of names over one space or will I have
to move them manually one name at a time?





Lacey1941

Moving text
 
I used the formula and it worked just fine........thank you

"Dave Peterson" wrote:

If there are no internal spaces in the data in that list, then maybe you can
just:

select that range
edit|replace
what: (spacebar)
with: (leave blank)
replace all

If there are internal spaces in the data in that list, you could:

Insert a new column (to its right?)
and use a formula like:
=trim(a1)
to remove all leading and all trailing space characters. It'll also convert
multiple internal space characters to a single space.

Then you could drag this formula down the column.
Select the column
Edit|copy
and then select the original column
Edit|paste special|values

and delete that helper column that holds the formula.

Lacey1941 wrote:

I have a rather long list of names and some of them have a space at the
beginning while others don't.

Is there a way to move whole groups of names over one space or will I have
to move them manually one name at a time?


--

Dave Peterson


David Biddulph[_2_]

Moving text
 
In which case, use B2 instead of A2 in the formula! [If you just copy my
formula one cell to the right, it will automatically change the references
from A2 to B2 for you.]
--
David Biddulph

"Lacey1941" wrote in message
...
Surnames are in column A and given name is in column B. It's the given
names
I want to move.

"David Biddulph" wrote:

=IF(LEFT(A2)=" ",RIGHT(A2,LEN(A2)-1),A2)
--
David Biddulph

"Lacey1941" wrote in message
...
I have a rather long list of names and some of them have a space at the
beginning while others don't.

Is there a way to move whole groups of names over one space or will I
have
to move them manually one name at a time?








All times are GMT +1. The time now is 10:04 AM.

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