ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Space removal - a first name,space last name (https://www.excelbanter.com/excel-discussion-misc-queries/219859-space-removal-first-name-space-last-name.html)

Tech Express

Space removal - a first name,space last name
 
How can I remove the space after the comma but not all the spaces?
Or enforce the rule - when a comma is used there will be one space and only
one space after the comma?

I have names on the database:
Bill, Smith
Bill,Smith

I need one or the other for unique names being serviced.

Thx

--
Russ at scaninc.org

Luke M

Space removal - a first name,space last name
 
You could just do a find & replace (Ctrl+H) and search for ", " and replace
with ","
To limit your search, if needed, select only the area you want to
replacements to occur before running.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Tech Express" wrote:

How can I remove the space after the comma but not all the spaces?
Or enforce the rule - when a comma is used there will be one space and only
one space after the comma?

I have names on the database:
Bill, Smith
Bill,Smith

I need one or the other for unique names being serviced.

Thx

--
Russ at scaninc.org


Pecoflyer[_129_]

Space removal - a first name,space last name
 

Luke M;221359 Wrote:
You could just do a find & replace (Ctrl+H) and search for ", " and
replace
with ","
To limit your search, if needed, select only the area you want to
replacements to occur before running.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Tech Express" wrote:

How can I remove the space after the comma but not all the spaces?
Or enforce the rule - when a comma is used there will be one space

and only
one space after the comma?

I have names on the database:
Bill, Smith
Bill,Smith

I need one or the other for unique names being serviced.

Thx

--
Russ at scaninc.org


Are ther possibly spaces at the start or end of the string ( before
Bill and/or after Smith)?


--
Pecoflyer

Cheers -
*'Membership is free' (http://www.thecodecage.com)* & allows file
upload -faster and better answers

*Adding your XL version* to your post helps finding solution faster
------------------------------------------------------------------------
Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=60994


Shane Devenshire[_2_]

Space removal - a first name,space last name
 
Hi,

Assume that you can have any number of spaces then the solution would be to
use TRIM

If A1 contains the name use =TRIM(A1)

copy as needed and convert to values, get rid of the originals

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Tech Express" wrote:

How can I remove the space after the comma but not all the spaces?
Or enforce the rule - when a comma is used there will be one space and only
one space after the comma?

I have names on the database:
Bill, Smith
Bill,Smith

I need one or the other for unique names being serviced.

Thx

--
Russ at scaninc.org


Pecoflyer[_134_]

Space removal - a first name,space last name
 

Shane, thx for your reminder about the number of columns for Access (
lost the post, sorry)


--
Pecoflyer

Cheers -
*'Membership is free' (http://www.thecodecage.com)* & allows file
upload -faster and better answers

*Adding your XL version* to your post helps finding solution faster
------------------------------------------------------------------------
Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=60994



All times are GMT +1. The time now is 07:11 PM.

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