Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro which delets in a cell all characters after comma
Look in the vba help index for INSTRREV
-- Don Guillett Microsoft MVP Excel SalesAid Software "andrei" wrote in message ... 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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Function/Macro that keeps first X characters in a cell and delets rest | Excel Programming | |||
Need macro that analyses 2 columns . Delets row if same text is fo | Excel Programming | |||
Macro analyses Cell . If text found , delets entire row | Excel Programming | |||
macro which delets cell if the cell above has the same keyword | Excel Programming | |||
Macro which searches for a character . When found delets what's be | Excel Programming |