ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do you remove a "," at the end of every cell? (https://www.excelbanter.com/excel-discussion-misc-queries/16676-how-do-you-remove-%22-%22-end-every-cell.html)

Mcobra41

How do you remove a "," at the end of every cell?
 
For example in one cell i have this
ZEZE MOTTA, WALMOR CHAGAS,
I want to remove the second "," after Walmor Chagas. But I want to keep the
first one. Any suggestions? Thanks for the help :)

Dave Peterson

It's always the last character?

If yes, you can use a helper column

=left(a1,len(a1)-1)
and drag down.


Mcobra41 wrote:

For example in one cell i have this
ZEZE MOTTA, WALMOR CHAGAS,
I want to remove the second "," after Walmor Chagas. But I want to keep the
first one. Any suggestions? Thanks for the help :)


--

Dave Peterson

Bill Martin -- (Remove NOSPAM from address)

Mcobra41 wrote:
For example in one cell i have this
ZEZE MOTTA, WALMOR CHAGAS,
I want to remove the second "," after Walmor Chagas. But I want to keep the
first one. Any suggestions? Thanks for the help :)


There's always the brute force approach:

[ ] = IF(RIGHT(A1)=",",LEFT(A1,LEN(A1)-1),A1)

or if you *know* that it ends with a comma, then don't use the IF:

[ ] = LEFT(A1,LEN(A1)-1)

Bill

Bob Phillips

=IF(RIGHT(A1,1)=",",LEFT(A1,LEN(A1)-1),A1)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Mcobra41" wrote in message
...
For example in one cell i have this
ZEZE MOTTA, WALMOR CHAGAS,
I want to remove the second "," after Walmor Chagas. But I want to keep

the
first one. Any suggestions? Thanks for the help :)




Bob Phillips


"Bill Martin -- (Remove NOSPAM from address)"
wrote in message ...
Mcobra41 wrote:

There's always the brute force approach:

[ ] = IF(RIGHT(A1)=",",LEFT(A1,LEN(A1)-1),A1)


That's not brute force, that's full error-handling (I subscribe to that
philosophy myself :-))




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

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