Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
yefei
 
Posts: n/a
Default find and remove a string of a cell value with comma as delimiter

can anyone help me on this?
i have columns of data which has the format of (something1,something2,
something3, others)
the string "somthing1", "somthing2", "somthing3" are consistent, and
not all may appear at the same time, while the part "others" may vary.
I want to extract the "others" part, if the cell has
how can i do this in a macro?
i donot want to modify the original cell, but will store the "others"
in another sheet

  #2   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default find and remove a string of a cell value with comma as delimiter

If you goto
the top file menu
data=text to columns
then select what you want, this will do exactly what you are asking
Dave

  #3   Report Post  
Posted to microsoft.public.excel.misc
yefei
 
Posts: n/a
Default find and remove a string of a cell value with comma as delimiter

thanks any way
i want to do it in macro, not manually
that is whenever i want to perform the task, just call the macro
all will be done

  #4   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default find and remove a string of a cell value with comma as delimiter

I just recorded this Macro and seems to work fine,
I highlited the range I wanted changed and clicked on the macro, and
voila,
they say the macro recorder will be a big thing someday!!!


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 2/28/2006 by Dave
'

'
Selection.TextToColumns Destination:=ActiveCell,
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False,
FieldInfo _
:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1),
Array(5, 1))
End Sub

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
copy and pasting a find all list into another column Ben Excel Discussion (Misc queries) 18 December 31st 05 10:51 PM
How to remove or replace a carriage return character in a cell? Patty Excel Discussion (Misc queries) 2 July 26th 05 06:25 PM
Excel - Find & Replace text in a string bklim Excel Worksheet Functions 1 June 14th 05 06:42 AM
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 09:56 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 05:40 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"