Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro which delets in a cell all characters after comma


Hi guys !

I have a lot of cells with text , empty spaces etc . All cells contain
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 !


--
andrei
------------------------------------------------------------------------
andrei's Profile: 1056
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=193313

http://www.thecodecage.com/forumz

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Macro which delets in a cell all characters after comma

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 befo
asdf,qwer,1234,erty
then you'll end up with:
asdf
when you're done.



andrei wrote:

Hi guys !

I have a lot of cells with text , empty spaces etc . All cells contain
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 !

--
andrei
------------------------------------------------------------------------
andrei's Profile: 1056
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=193313

http://www.thecodecage.com/forumz


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro which delets in a cell all characters after comma


Yep , it works . Many thanks


--
andrei
------------------------------------------------------------------------
andrei's Profile: 1056
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=193313

http://www.thecodecage.com/forumz

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function/Macro that keeps first X characters in a cell and delets rest andrei[_12_] Excel Programming 3 January 12th 10 10:33 AM
Need macro that analyses 2 columns . Delets row if same text is fo andrei Excel Programming 3 October 5th 09 05:37 PM
Macro analyses Cell . If text found , delets entire row andrei Excel Programming 6 October 1st 09 05:56 PM
macro which delets cell if the cell above has the same keyword andrei Excel Programming 2 September 29th 09 07:46 AM
Macro which searches for a character . When found delets what's be andrei Excel Programming 4 September 28th 09 06:09 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"