Macro which delets in a cell all characters after comma

A

andrei

Hi guys !

I have a lot of cells with text , empty spaces etc . All cells contai
a "," (comma) . I need a macro that delets all after that comma
including comma . I give in example :

A1 : mother, father

The result should be :

A1 : mother

Many thanks !
 
D

Dave Peterson

If you want to get rid of everything after the first (or only) comma, you could
record a macro when:

You select the range to fix
edit|replace
what: ,* (comma followed by an asterisk)
with: (leave blank)
replace all

Be aware that if your data looks like this before:
asdf,qwer,1234,erty
then you'll end up with:
asdf
when you're done.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top